docker compose

This commit is contained in:
1iaan
2026-04-04 16:30:54 +08:00
parent c1a895258f
commit e993eb6c5c
25 changed files with 241 additions and 95 deletions

View File

@@ -1,11 +1,24 @@
FROM chenzhaoyu94/chatgpt-web:v2.10.9 as frontend
FROM arvintian/chatgpt-web-base:v1
COPY --from=frontend /app/public /app/public
ADD dist/server /app/server
EXPOSE 7080
CMD ["/app/server"]
FROM golang:1.23-alpine AS builder
WORKDIR /src
ENV GOPROXY=https://goproxy.cn,direct
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags="-w -s" -o /out/server ./cmd/main.go
FROM alpine:3.20
WORKDIR /app
RUN apk add --no-cache ca-certificates tzdata
COPY --from=builder /out/server /app/server
COPY ./www /app/www
EXPOSE 7080
CMD ["/app/server"]