File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,12 +76,12 @@ RUN mkdir -p /app/tmp/pids /app/tmp/cache /app/tmp/sockets /app/log && \
7676# Switch to non-root user
7777USER rails:rails
7878
79- # Expose port
79+ # Expose port (Railway sets PORT=8080 by default)
8080EXPOSE 3000
8181
82- # Health check
82+ # Health check (uses PORT env variable to match runtime configuration)
8383HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
84- CMD curl -f http://localhost:3000/up || exit 1
84+ CMD curl -f http://localhost:${PORT:- 3000} /up || exit 1
8585
8686# Entry point for database migration
8787COPY --chown=rails:rails deploy/scripts/docker-entrypoint.sh /usr/local/bin/
Original file line number Diff line number Diff line change 1414 "env" : {
1515 "RAILS_ENV" : " production" ,
1616 "RAILS_LOG_TO_STDOUT" : " true" ,
17- "RAILS_SERVE_STATIC_FILES" : " true"
17+ "RAILS_SERVE_STATIC_FILES" : " true" ,
18+ "PORT" : " 8080"
1819 }
1920}
You can’t perform that action at this time.
0 commit comments