Skip to content

Railway Deployment #e87d24 fix: use $PORT for PocketBase#20

Open
railway-dev[bot] wants to merge 1 commit intomainfrom
railway/fix-deploy-e87d24
Open

Railway Deployment #e87d24 fix: use $PORT for PocketBase#20
railway-dev[bot] wants to merge 1 commit intomainfrom
railway/fix-deploy-e87d24

Conversation

@railway-dev
Copy link
Copy Markdown

@railway-dev railway-dev bot commented Mar 24, 2026

Problem

PocketBase is hardcoded to listen on port 8080 via the JSON array CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8080"], but Railway assigns a dynamic port via the $PORT environment variable and runs healthchecks against that port. Since PocketBase never binds to $PORT, every healthcheck probe returns "service unavailable" and the deployment fails.

Solution

Switched the Dockerfile CMD from JSON array form to shell form so environment variables are expanded at runtime. ${PORT:-8080} uses Railway's dynamically assigned $PORT when present, falling back to 8080 for local development. PocketBase now listens on the correct port and Railway's healthcheck succeeds.

Changes

  • Modified Dockerfile

Context

  • Deployment: #e87d24
  • Failed commit: a33b098

Generated by Railway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants