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
+3 -4
View File
@@ -1,14 +1,13 @@
services:
mirror-proxy:
# 使用 GHCR 预构建镜像(推荐)
# image: ghcr.io/arkylin/mirror-proxy:latest
build: .
image: ghcr.io/arkylin/mirror-proxy:latest
container_name: mirror-proxy
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./config.json:/app/config.json
- ./config:/app/config
- ./cache:/app/cache
environment:
- TZ=Asia/Shanghai
- CONFIG_PATH=/app/config/config.json