Skip to content

Commit

Permalink
fix: added prod script to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
vasujain275 committed Jun 21, 2024
1 parent 2bc03ba commit 1025dae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ EXPOSE 8069

RUN pnpm dlx prisma generate

CMD [ "pnpm", "run", "start" ]
CMD [ "pnpm", "run", "prod" ]
3 changes: 1 addition & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ services:
environment:
- NODE_ENV=production
- DATABASE_URL=postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres123}@postgres:5432/${POSTGRES_DB:-bookstoreDB}
env_file:
- .env
- PORT=8069
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"predev": "rimraf dist && pnpm run build",
"dev": "concurrently \"tsc -w\" \"nodemon --env-file .env dist/index.js\"",
"lint": "pnpm exec prettier . --write",
"serve": "node dist/index.js"
"serve": "node dist/index.js",
"preprod": "pnpm run build",
"prod":"node dist/index.js"
},
"keywords": [],
"author": "Vasu Jain",
Expand Down

0 comments on commit 1025dae

Please sign in to comment.