fix: mount config directory instead of file for Docker Compose
Build and Push to GHCR / build-and-push (push) Has been cancelled
Build and Push to GHCR / build-and-push (push) Has been cancelled
- Add CONFIG_PATH env support to avoid Docker creating config.json as a directory - Config Save() now auto-creates parent directories - Update docker-compose.yml to mount ./config:/app/config - Update README deployment docs accordingly
This commit is contained in:
+5
-1
@@ -15,7 +15,11 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg, err := config.Load("config.json")
|
||||
configPath := os.Getenv("CONFIG_PATH")
|
||||
if configPath == "" {
|
||||
configPath = "config.json"
|
||||
}
|
||||
cfg, err := config.Load(configPath)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to load config: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user