Skip to content

Update builder configuration in railway.json#33

Merged
emidiovaleretto merged 1 commit into
mainfrom
fix/dockerfile-cmd-gunicorn
Jun 11, 2026
Merged

Update builder configuration in railway.json#33
emidiovaleretto merged 1 commit into
mainfrom
fix/dockerfile-cmd-gunicorn

Conversation

@emidiovaleretto

Copy link
Copy Markdown
Owner

What

Removes the startCommand from railway.json, letting the Dockerfile's
CMD define how the app starts.

Why

The production deploy kept failing with:
Error: '$PORT' is not a valid port number.

The start command was defined in three places (railway.json startCommand,
Dockerfile CMD, and the Procfile), and railway.json takes priority over
the others. Its startCommand passed $PORT in a form that wasn't expanded
by a shell, so gunicorn received the literal string $PORT instead of the
port Railway injects.

The Dockerfile CMD already uses the shell form, which expands $PORT
correctly. Removing the startCommand makes the Dockerfile CMD the single
source of truth for the start command and resolves the port error.

Notes

  • builder is kept as DOCKERFILE so the build still uses our Dockerfile
    (which installs gunicorn from production.txt)

How to verify

  • Build Logs show a real build (pip install runs, gunicorn is installed)
  • Deploy Logs no longer show the $PORT error and gunicorn starts
  • The app responds at the Railway URL

Changed builder type to DOCKERFILE and specified dockerfilePath.
@emidiovaleretto emidiovaleretto merged commit cc155c3 into main Jun 11, 2026
2 checks passed
@emidiovaleretto emidiovaleretto deleted the fix/dockerfile-cmd-gunicorn branch June 11, 2026 11:52
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.

1 participant