feat: add files
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
ARG NODE_VERSION=20.10.0
|
||||
ARG PORT=3000
|
||||
|
||||
FROM node:${NODE_VERSION}-slim as base
|
||||
ENV NODE_ENV=production
|
||||
ENV NODE_OPTIONS=--max-old-space-size=8192
|
||||
WORKDIR /app
|
||||
|
||||
FROM base as build
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm install --production=false
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN npm prune
|
||||
|
||||
FROM base as production
|
||||
ENV PORT=$PORT
|
||||
COPY --from=build /app/.output /app/.output
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
Reference in New Issue
Block a user