Load .env and config.json for local go runs

This commit is contained in:
Kazakiri220
2026-04-04 20:21:17 +08:00
parent 068f4b0df6
commit 541bd67c7c
5 changed files with 181 additions and 7 deletions

View File

@@ -1,13 +1,15 @@
services:
ds2api:
image: ghcr.io/cjackhwang/ds2api:latest
container_name: ds2api
restart: always
ports:
- "6011:5001"
volumes:
- ./config.json:/app/config.json # 配置文件
- ./.env:/app/.env # 环境变量
container_name: ds2api
restart: always
env_file:
- .env
ports:
- "${DS2API_HOST_PORT:-6011}:${PORT:-5001}"
volumes:
- ./config.json:/app/config.json # 配置文件
- ./.env:/app/.env # 环境变量
environment:
- TZ=Asia/Shanghai
- LOG_LEVEL=INFO