Clean Image
All checks were successful
CI for GGS-CRON / build-and-test (push) Successful in 2m58s
CI for GGS-CRON / build-docker (push) Successful in 1m41s

This commit is contained in:
Ittipat Lusuk 2025-08-11 12:41:28 +07:00
parent 8602f8fc3f
commit cf93a9cfe2
6 changed files with 515 additions and 12 deletions

View file

@ -1,28 +1,25 @@
FROM node:20-alpine AS builder
RUN apk add --no-cache tzdata
ENV TZ=Asia/Bangkok
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
RUN npm install
COPY . .
FROM gcr.io/distroless/nodejs20
RUN npm run build
FROM gcr.io/distroless/nodejs20:nonroot
ENV TZ=Asia/Bangkok
ENV NODE_ENV=production
ENV DEBUG=server:*
ENV PORT=36531
WORKDIR /app
COPY --from=builder /app /app
COPY --from=builder /app/dist/app.js /app/app.js
COPY --from=builder /app/plugins /app/plugins
EXPOSE 36531
CMD ["./bin/www"]
CMD ["app.js"]