feat: complete SOP execution workflow
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM node:22-alpine AS web-builder
|
||||
|
||||
WORKDIR /src/web
|
||||
COPY web/package.json web/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY web/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM golang:1.24-alpine AS go-builder
|
||||
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN GOPROXY=${GOPROXY} go mod download
|
||||
COPY . ./
|
||||
COPY --from=web-builder /src/web/dist ./web/dist
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/iqudo-top1 .
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata \
|
||||
&& addgroup -S app \
|
||||
&& adduser -S -G app app
|
||||
WORKDIR /app
|
||||
COPY --from=go-builder /out/iqudo-top1 /app/iqudo-top1
|
||||
COPY configs/config.example.yml /app/configs/config.yml
|
||||
COPY configs/config.prod.yml /app/configs/config.prod.yml
|
||||
USER app
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/app/iqudo-top1", "-env", "prod", "-config-dir", "/app/configs"]
|
||||
Reference in New Issue
Block a user