feat(deploy): dev compose runs full stack with source mounts, delve, shared volumes; vite proxy target via env (dlv --accept-multiclient, GOPROXY=goproxy.cn in dev image)

This commit is contained in:
2026-09-07 21:04:40 +08:00
parent 0ea918fae6
commit 0de824cc6a
5 changed files with 44 additions and 4 deletions
+3 -1
View File
@@ -3,6 +3,8 @@ WORKDIR /app
FROM base AS dev
# 源码由 compose 挂载进 /app;镜像只带工具链 + delve
# 国内直连 proxy.golang.org 会超时,goproxy.cn 走直连
ENV GOPROXY=https://goproxy.cn,direct
RUN go install github.com/go-delve/delve/cmd/dlv@latest
EXPOSE 8080 2345
CMD ["sh", "-c", "go mod download && dlv debug ./cmd/server --headless --listen=0.0.0.0:2345 --api-version=2 --continue --log"]
CMD ["sh", "-c", "go mod download && dlv debug ./cmd/server --headless --listen=0.0.0.0:2345 --api-version=2 --accept-multiclient --continue --log"]