Consolidate app files

This commit is contained in:
Alan Grainger
2024-11-02 22:18:04 +01:00
parent 12064d740f
commit 69d88fa849
32 changed files with 15 additions and 13 deletions
+8 -3
View File
@@ -2,11 +2,12 @@ FROM node:lts-slim
WORKDIR /app
COPY package.json ./
COPY app/package.json ./
RUN npm install --omit=dev
RUN npm install pm2 -g
COPY . .
COPY app/ ./
ENV NODE_ENV=production
@@ -14,4 +15,8 @@ ENV NODE_ENV=production
# dev-dependencies above to save space in the final build
RUN npx tsc --noCheck
CMD [ "node", "dist/index.js" ]
RUN chown -R node:node /app
USER node
CMD ["pm2-runtime", "dist/index.js" ]