Updated dockerfile
This commit is contained in:
parent
b633aeb9e5
commit
cae03f0e30
1 changed files with 9 additions and 6 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -1,25 +1,28 @@
|
|||
FROM node:20-alpine AS builder
|
||||
|
||||
RUN apk add --no-cache tzdata
|
||||
|
||||
ENV TZ=Asia/Bangkok
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
FROM gcr.io/distroless/nodejs20
|
||||
|
||||
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/dist/app.js /app/app.js
|
||||
COPY --from=builder /app/plugins /app/plugins
|
||||
COPY --from=builder /app /app
|
||||
|
||||
EXPOSE 36531
|
||||
|
||||
CMD ["app.js"]
|
||||
CMD ["./bin/www"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue