remove pm2 process manager - let the container orchestrator handle the lifetime events (docker, podman, k8s etc)
This commit is contained in:
@@ -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" ]
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
apps: [
|
|
||||||
{
|
|
||||||
name: "consumer",
|
|
||||||
script: "npm start",
|
|
||||||
cwd: "/app",
|
|
||||||
watch: ["./dist/index.cjs"],
|
|
||||||
autorestart: true,
|
|
||||||
env: {
|
|
||||||
...process.env
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user