fix: fix and optimize Dockerfile

This commit is contained in:
tdurieux
2023-02-13 14:07:51 +01:00
parent ec6098b3a1
commit 99f837c3cf
2 changed files with 9 additions and 5 deletions

View File

@@ -10,12 +10,16 @@ RUN npm install pm2 -g && pm2 install typescript && npm cache clean --force;
COPY package.json .
COPY package-lock.json .
RUN npm install && npm run build && npm cache clean --force
COPY tsconfig.json .
COPY ecosystem.config.js .
COPY healthcheck.js .
COPY src .
COPY src ./src
COPY public ./public
COPY index.ts .
COPY public .
COPY config.ts .
RUN npm install && npm run build && npm cache clean --force
CMD [ "pm2-runtime", "ecosystem.config.js"]

View File

@@ -12,7 +12,7 @@ module.exports = {
"public",
".git",
"db_backups",
"dist",
"build",
],
interpreter: "node",
interpreter_args: "--require ts-node/register",