build: isolate go module proxy setting

This commit is contained in:
dela
2026-05-24 21:50:22 +08:00
parent 6f4e7f04cc
commit 622ff1d317
5 changed files with 15 additions and 9 deletions

View File

@@ -45,13 +45,15 @@ services:
context: .
dockerfile: Dockerfile
args:
GOPROXY: ${GOPROXY:-https://goproxy.cn,direct}
GOPROXY: ${GO_MODULE_PROXY:-https://goproxy.cn,direct}
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
NO_PROXY: ${NO_PROXY:-}
http_proxy: ${HTTP_PROXY:-}
https_proxy: ${HTTPS_PROXY:-}
no_proxy: ${NO_PROXY:-}
extra_hosts:
- "host.docker.internal:host-gateway"
container_name: crypto-hermes-market-gateway
depends_on:
postgres:
@@ -73,6 +75,8 @@ services:
volumes:
- ./config:/app/config:ro
- ./logs:/app/logs
extra_hosts:
- "host.docker.internal:host-gateway"
# SIGTERM → 等 app 内置 10s graceful shutdownfiber.ShutdownWithContext
# + cron 任务结束的缓冲 = 30s。超时后 docker 发 SIGKILL。
stop_grace_period: 30s