Files
Mycontent/soul-api/deploy/Dockerfile
Alex-larget a696b0cefc chore: update project index and meeting notes for April 2, 2026
- Added new entries for meetings discussing work progress and requirement synchronization across various project components.
- Updated the last modified date to April 2, 2026, in multiple project index files.
- Documented changes in the sync log for assistant-doc-sync regarding the meeting outcomes.
2026-04-02 11:03:23 +08:00

38 lines
842 B
Docker

# 以下由「部署管理器」根据项目配置在保存时自动生成/更新
# 根据「构建命令」解析编译目标;可在项目表单中修改 buildCmd
FROM golang:1.25 AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o /out/soul-api ./cmd/server
FROM alpine:3.19
WORKDIR /app
RUN apk add --no-cache ca-certificates tzdata wget && \
addgroup -S app && adduser -S -G app app
COPY --from=builder /out/soul-api /app/soul-api
# 若需要微信支付证书,创建 certs/ 后取消下行注释
# COPY certs/ /app/certs/
RUN mkdir -p /app/uploads /app/log && chown -R app:app /app
ENV APP_ENV=production
ENV GIN_MODE=release
ENV PORT=8080
ENV UPLOAD_DIR=/app/uploads
EXPOSE 8080
USER app
CMD ["/app/soul-api"]