更新版本
This commit is contained in:
parent
b449737bd0
commit
422ef05adc
@ -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:
|
services:
|
||||||
gateway-service:
|
gateway-service:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: services/gateway-service/Dockerfile
|
dockerfile: services/gateway-service/Dockerfile
|
||||||
|
args: *go-build-args
|
||||||
container_name: gateway-service
|
container_name: gateway-service
|
||||||
environment:
|
environment:
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
@ -26,6 +31,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: services/room-service/Dockerfile
|
dockerfile: services/room-service/Dockerfile
|
||||||
|
args: *go-build-args
|
||||||
container_name: room-service
|
container_name: room-service
|
||||||
environment:
|
environment:
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
@ -49,6 +55,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: services/wallet-service/Dockerfile
|
dockerfile: services/wallet-service/Dockerfile
|
||||||
|
args: *go-build-args
|
||||||
container_name: wallet-service
|
container_name: wallet-service
|
||||||
environment:
|
environment:
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
@ -72,6 +79,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: services/user-service/Dockerfile
|
dockerfile: services/user-service/Dockerfile
|
||||||
|
args: *go-build-args
|
||||||
container_name: user-service
|
container_name: user-service
|
||||||
environment:
|
environment:
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
@ -91,6 +99,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: services/activity-service/Dockerfile
|
dockerfile: services/activity-service/Dockerfile
|
||||||
|
args: *go-build-args
|
||||||
container_name: activity-service
|
container_name: activity-service
|
||||||
environment:
|
environment:
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
@ -112,6 +121,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: services/cron-service/Dockerfile
|
dockerfile: services/cron-service/Dockerfile
|
||||||
|
args: *go-build-args
|
||||||
container_name: cron-service
|
container_name: cron-service
|
||||||
environment:
|
environment:
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
|
|||||||
@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /src
|
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 go.mod go.sum ./
|
||||||
COPY api/go.mod api/go.sum ./api/
|
COPY api/go.mod api/go.sum ./api/
|
||||||
RUN GOWORK=off go mod download
|
RUN GOWORK=off go mod download
|
||||||
|
|||||||
@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /src
|
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 go.mod go.sum ./
|
||||||
COPY api/go.mod api/go.sum ./api/
|
COPY api/go.mod api/go.sum ./api/
|
||||||
RUN GOWORK=off go mod download
|
RUN GOWORK=off go mod download
|
||||||
|
|||||||
@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /src
|
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 go.mod go.sum ./
|
||||||
COPY api/go.mod api/go.sum ./api/
|
COPY api/go.mod api/go.sum ./api/
|
||||||
RUN GOWORK=off go mod download
|
RUN GOWORK=off go mod download
|
||||||
|
|||||||
@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /src
|
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 go.mod go.sum ./
|
||||||
COPY api/go.mod api/go.sum ./api/
|
COPY api/go.mod api/go.sum ./api/
|
||||||
RUN GOWORK=off go mod download
|
RUN GOWORK=off go mod download
|
||||||
|
|||||||
@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /src
|
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 go.mod go.sum ./
|
||||||
COPY api/go.mod api/go.sum ./api/
|
COPY api/go.mod api/go.sum ./api/
|
||||||
RUN GOWORK=off go mod download
|
RUN GOWORK=off go mod download
|
||||||
|
|||||||
@ -2,6 +2,11 @@ FROM golang:1.26.3-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /src
|
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 go.mod go.sum ./
|
||||||
COPY api/go.mod api/go.sum ./api/
|
COPY api/go.mod api/go.sum ./api/
|
||||||
RUN GOWORK=off go mod download
|
RUN GOWORK=off go mod download
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user