Skip to content

Commit

Permalink
using pm2 as a production ready script in the prod-entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kiloutyg committed Mar 21, 2024
1 parent b68b5ef commit a5595d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion API/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"pdfkit": "^0.14.0",
"sharp": "^0.33.2",
"text-to-image": "^5.2.0",
"forever": "^4.0.3"
},
"devDependencies": {
"jest": "^29.7.0",
Expand Down
4 changes: 3 additions & 1 deletion API/prod-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ export NODE_ENV=production;

npm install --only=production;

forever start index.js;
npm install -g pm2;

pm2-runtime start index.js;
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- "3306"
networks:
vpcbr:
ipv4_address: 172.23.0.2
ipv4_address: 172.25.0.2
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: unless-stopped
Expand All @@ -31,7 +31,7 @@ services:
- traefik.http.routers.phpmyadminposign.entrypoints=web
networks:
vpcbr:
ipv4_address: 172.23.0.3
ipv4_address: 172.25.0.3
depends_on:
- database

Expand All @@ -40,8 +40,8 @@ networks:
driver: bridge
ipam:
config:
- subnet: 172.23.0.0/16
- gateway: 172.23.0.1
- subnet: 172.25.0.0/16
- gateway: 172.25.0.1



Expand Down

0 comments on commit a5595d7

Please sign in to comment.