remove pm2 process manager - let the container orchestrator handle the lifetime events (docker, podman, k8s etc)

This commit is contained in:
iPromKnight
2024-02-03 22:06:02 +00:00
parent 678b3857f3
commit 4bd76d682f
2 changed files with 1 additions and 18 deletions

View File

@@ -14,9 +14,6 @@ RUN npm run build
# --- Runtime Stage --- # --- Runtime Stage ---
FROM node:lts-buster-slim FROM node:lts-buster-slim
# Install pm2
RUN npm install pm2 -g
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV production
@@ -26,4 +23,4 @@ RUN npm prune --omit=dev
EXPOSE 7001 EXPOSE 7001
ENTRYPOINT [ "pm2-runtime", "start", "ecosystem.config.cjs"] ENTRYPOINT [ "node", "dist/index.cjs" ]

View File

@@ -1,14 +0,0 @@
module.exports = {
apps: [
{
name: "consumer",
script: "npm start",
cwd: "/app",
watch: ["./dist/index.cjs"],
autorestart: true,
env: {
...process.env
},
},
],
};