fix: mount config directory instead of file for Docker Compose
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:
Agent
2026-05-24 15:44:29 +08:00
parent 45da2d1d0c
commit 44c8ff6a6f
6 changed files with 42 additions and 14 deletions
+5 -1
View File
@@ -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)
}