Skip to content

Commit 9d567cf

Browse files
author
Hamza Shahid
committed
fix: use railway PORT env var for server port
1 parent fdd5536 commit 9d567cf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ ENV DOCKER_ENV=true
5757

5858
EXPOSE 8080
5959

60-
# Simplified startup that handles DATABASE_URL from DATABASE_CONNECTION_URI
61-
ENTRYPOINT ["/bin/bash", "-c", "export DATABASE_URL=$DATABASE_CONNECTION_URI && npm run db:deploy && npm run start:prod"]
60+
# Railway assigns PORT dynamically, app uses SERVER_PORT
61+
# Also set DATABASE_URL from DATABASE_CONNECTION_URI for Prisma
62+
ENTRYPOINT ["/bin/bash", "-c", "export DATABASE_URL=$DATABASE_CONNECTION_URI && export SERVER_PORT=${PORT:-8080} && npm run db:deploy && npm run start:prod"]

0 commit comments

Comments
 (0)