This commit is contained in:
Lee 2024-01-03 07:30:29 +00:00
parent e603f65fdc
commit 9453ef59d3
2 changed files with 10 additions and 6 deletions

View File

@ -1,9 +1,15 @@
FROM node:lts-alpine
FROM fascinated/docker-images:node-pnpm-latest AS base
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY ["package.json", "pnpm-lock.json", "./"]
RUN pnpm install --production --silent && mv node_modules ../
COPY . .
RUN chown -R node /usr/src/app
USER node
CMD ["node", "index.js"]
CMD pnpm run start

View File

@ -3,5 +3,3 @@ version: "3.4"
services:
backend:
image: fascinated/mc-tracker-backend:influx
environment:
NODE_ENV: production