fix(devops): Dockerfile & .local.env support added
Hello World / hello (push) Has been cancelled
Build / test-and-build (scribblers-linux-x64, ubuntu-latest) (push) Has been cancelled
Build / test-and-build (scribblers-macos-x64, macos-latest) (push) Has been cancelled
Build / test-and-build (scribblers-x64.exe, windows-latest) (push) Has been cancelled

This commit is contained in:
2026-05-13 10:45:07 +03:30
parent c46b30e725
commit bdb2fcc68f
5 changed files with 60 additions and 82 deletions
+13
View File
@@ -133,6 +133,19 @@ func Load() (*Config, error) {
maps.Copy(envVars, envFileContent)
}
dotEnvPath = ".local.env"
if _, err := os.Stat(dotEnvPath); err != nil {
if !os.IsNotExist(err) {
return nil, fmt.Errorf("error checking for existence of .local.env file: %w", err)
}
} else {
envFileContent, err := gotenv.Read(dotEnvPath)
if err != nil {
return nil, fmt.Errorf("error reading .local.env file: %w", err)
}
maps.Copy(envVars, envFileContent)
}
// Add local environment variables to EnvVars map
for _, keyValuePair := range os.Environ() {
pair := strings.SplitN(keyValuePair, "=", 2)