Skip to content

Commit 5c7d5f3

Browse files
committed
chore: run with pm2
1 parent bc6ec79 commit 5c7d5f3

File tree

5 files changed

+1794
-742
lines changed

5 files changed

+1794
-742
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ RUN adduser app -h /app -D
1919
USER app
2020
WORKDIR /app
2121
COPY --from=build --chown=app /app /app
22-
CMD ["node", "."]
22+
CMD ["npm", "start"]

ecosystem.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
apps : [{
3+
name: "dgraph-lambda",
4+
script: "./dist/index.js",
5+
instances: 4,
6+
watch: ["script.js"],
7+
exec_mode : "cluster",
8+
env: {
9+
NODE_ENV: "development",
10+
},
11+
env_production: {
12+
NODE_ENV: "production",
13+
}
14+
}]
15+
}

0 commit comments

Comments
 (0)