更新版本

This commit is contained in:
zhx 2026-05-12 11:26:42 +08:00
parent b449737bd0
commit 422ef05adc
7 changed files with 40 additions and 0 deletions

View File

@ -1,8 +1,13 @@
x-go-build-args: &go-build-args
GOPROXY: "${GOPROXY:-https://goproxy.cn|https://proxy.golang.org|direct}"
GOSUMDB: "${GOSUMDB:-sum.golang.org}"
services:
gateway-service:
build:
context: .
dockerfile: services/gateway-service/Dockerfile
args: *go-build-args
container_name: gateway-service
environment:
TZ: UTC
@ -26,6 +31,7 @@ services:
build:
context: .
dockerfile: services/room-service/Dockerfile
args: *go-build-args
container_name: room-service
environment:
TZ: UTC
@ -49,6 +55,7 @@ services:
build:
context: .
dockerfile: services/wallet-service/Dockerfile
args: *go-build-args
container_name: wallet-service
environment:
TZ: UTC
@ -72,6 +79,7 @@ services:
build:
context: .
dockerfile: services/user-service/Dockerfile
args: *go-build-args
container_name: user-service
environment:
TZ: UTC
@ -91,6 +99,7 @@ services:
build:
context: .
dockerfile: services/activity-service/Dockerfile
args: *go-build-args
container_name: activity-service
environment:
TZ: UTC
@ -112,6 +121,7 @@ services:
build:
context: .
dockerfile: services/cron-service/Dockerfile
args: *go-build-args
container_name: cron-service
environment:
TZ: UTC

View File

@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
WORKDIR /src
# Module proxy is a build-time contract so Docker builds can recover from transient proxy EOFs.
ARG GOPROXY=https://goproxy.cn|https://proxy.golang.org|direct
ARG GOSUMDB=sum.golang.org
ENV GOPROXY=${GOPROXY} GOSUMDB=${GOSUMDB}
COPY go.mod go.sum ./
COPY api/go.mod api/go.sum ./api/
RUN GOWORK=off go mod download

View File

@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
WORKDIR /src
# Module proxy is a build-time contract so Docker builds can recover from transient proxy EOFs.
ARG GOPROXY=https://goproxy.cn|https://proxy.golang.org|direct
ARG GOSUMDB=sum.golang.org
ENV GOPROXY=${GOPROXY} GOSUMDB=${GOSUMDB}
COPY go.mod go.sum ./
COPY api/go.mod api/go.sum ./api/
RUN GOWORK=off go mod download

View File

@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
WORKDIR /src
# Module proxy is a build-time contract so Docker builds can recover from transient proxy EOFs.
ARG GOPROXY=https://goproxy.cn|https://proxy.golang.org|direct
ARG GOSUMDB=sum.golang.org
ENV GOPROXY=${GOPROXY} GOSUMDB=${GOSUMDB}
COPY go.mod go.sum ./
COPY api/go.mod api/go.sum ./api/
RUN GOWORK=off go mod download

View File

@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
WORKDIR /src
# Module proxy is a build-time contract so Docker builds can recover from transient proxy EOFs.
ARG GOPROXY=https://goproxy.cn|https://proxy.golang.org|direct
ARG GOSUMDB=sum.golang.org
ENV GOPROXY=${GOPROXY} GOSUMDB=${GOSUMDB}
COPY go.mod go.sum ./
COPY api/go.mod api/go.sum ./api/
RUN GOWORK=off go mod download

View File

@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
WORKDIR /src
# Module proxy is a build-time contract so Docker builds can recover from transient proxy EOFs.
ARG GOPROXY=https://goproxy.cn|https://proxy.golang.org|direct
ARG GOSUMDB=sum.golang.org
ENV GOPROXY=${GOPROXY} GOSUMDB=${GOSUMDB}
COPY go.mod go.sum ./
COPY api/go.mod api/go.sum ./api/
RUN GOWORK=off go mod download

View File

@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
WORKDIR /src
# Module proxy is a build-time contract so Docker builds can recover from transient proxy EOFs.
ARG GOPROXY=https://goproxy.cn|https://proxy.golang.org|direct
ARG GOSUMDB=sum.golang.org
ENV GOPROXY=${GOPROXY} GOSUMDB=${GOSUMDB}
COPY go.mod go.sum ./
COPY api/go.mod api/go.sum ./api/
RUN GOWORK=off go mod download