xiabin 90f1d6eecf
All checks were successful
Auth & User Management Service CI / build-services (app/douyin_ecpm_calculation_service/Dockerfile, douyin_ecpm_calculation_service, douyin_ecpm_calculation_service) (push) Successful in 36s
Auth & User Management Service CI / build-services (app/ranking_management/Dockerfile, ranking_management, ranking_management) (push) Successful in 41s
Auth & User Management Service CI / build-services (app/auth_service/Dockerfile, auth_service, auth_service) (push) Successful in 41s
Auth & User Management Service CI / build-services (app/user_management/Dockerfile, user_manager, user_management) (push) Successful in 38s
Auth & User Management Service CI / start-services (push) Successful in 5s
各服务数据库逻辑拆分
更新用户id为Sonyflake

添加gitea actions(ci/cd)

配置文件读取方式改为从ETCD读取

修改go module名称与gitea一致
2025-02-11 18:31:28 +08:00

34 lines
778 B
Docker

FROM golang:alpine AS builder
LABEL stage=gobuilder
ENV CGO_ENABLED=0
ENV GOPROXY=https://goproxy.cn,direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk update --no-cache && apk add --no-cache tzdata
RUN apk add --no-cache git
WORKDIR /build
ADD go.mod .
ADD go.sum .
RUN go env -w GOPRIVATE=gitea.youtukeji.com.cn
RUN go mod download
COPY . .
RUN go build -ldflags="-s -w" -o /app/douyin_ecpm_calculation_service ./app/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service.go
FROM alpine
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
ENV TZ=Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/douyin_ecpm_calculation_service /app/server
EXPOSE 8888
CMD ["/app/server"]