mirror of
https://github.com/maciejpedzich/six-degs-of-f1.git
synced 2024-11-27 15:55:47 +01:00
19 lines
380 B
Docker
19 lines
380 B
Docker
FROM node:lts-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm i
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:lts-alpine AS runtime
|
|
USER node
|
|
WORKDIR /app
|
|
ENV NODE_ENV production
|
|
ENV HOST 0.0.0.0
|
|
ENV PORT 4321
|
|
COPY --chown=node:node package*.json ./
|
|
RUN npm ci --omit=dev
|
|
COPY --from=build --chown=node:node /app/dist ./dist
|
|
EXPOSE 4321
|
|
CMD ["node", "./dist/server/entry.mjs"]
|