chore: switch from pm2 to node

This commit is contained in:
Matthew Lopez 2024-06-04 12:15:02 -04:00
parent 331cf24564
commit c49fece88f
No known key found for this signature in database
GPG Key ID: 302A6EE3D63B7E0E
2 changed files with 6 additions and 3 deletions

View File

@ -2,6 +2,7 @@
ARG app_dir="/home/node/app"
# * Base Node.js image
FROM node:20-alpine AS base
ARG app_dir
@ -33,8 +34,6 @@ RUN npm run build
FROM base AS final
ARG app_dir
RUN npm install -g pm2
ENV NODE_ENV production
USER node
@ -43,4 +42,4 @@ COPY package.json .
COPY --from=dependencies ${app_dir}/node_modules ${app_dir}/node_modules
COPY --from=build ${app_dir}/dist ${app_dir}/dist
CMD ["pm2-runtime", "start", "."]
CMD ["node", "."]

View File

@ -3,6 +3,10 @@ import { table } from 'table';
import colors from '@colors/colors';
import dotenv from 'dotenv';
process.on('SIGTERM', () => {
process.exit();
});
dotenv.config();
const addressMap: Record<string, string> = {};