Skip to content

Commit

Permalink
fix: run pnpm prod with migration and start server instead of entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dahal committed May 18, 2024
1 parent 5e18b2f commit 2add6d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV HOST "0.0.0.0"

# Run the migration script
RUN chmod +x ./docker/entrypoint.sh
ENTRYPOINT [ "./docker/entrypoint.sh" ]
# # Run the migration script
# RUN chmod +x ./docker/entrypoint.sh
# ENTRYPOINT [ "./docker/entrypoint.sh" ]

# Run the server
CMD ["pnpm", "prod"]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"prod": "NODE_ENV=production prisma migrate deploy && next start",
"postinstall": "prisma generate",
"prepare": "husky install",
"lint": "biome check --apply ./src",
Expand Down

0 comments on commit 2add6d7

Please sign in to comment.