problema postgres
loureiroblanco
HOBBYOP

a month ago

Project: ayurveda (service "web", environment "production")

Referenced variable ${{Postgres.DATABASE_URL}} in the web service does not appear in the running process's environment at all (verified via os.environ dump printed at startup — 55 other vars including manually-set literal ones like ANTHROPIC_API_KEY, STRIPE_SECRET_KEY are present and correct, but DATABASE_URL is completely absent).

Steps taken:

Confirmed Postgres service (same project, same "production" environment) has DATABASE_URL set with a valid value (verified by revealing it directly in that service's Variables tab).

Deleted and recreated DATABASE_URL in the web service as a reference ${{Postgres.DATABASE_URL}} — same result.

Forced multiple manual redeploys after each change.

Confirmed both services are in the same environment ("production"), only one environment exists in this project.

Confirmed the web service's public domain (web-production-eecb.up.railway.app) matches the service where I'm editing variables (checked via Settings → Networking).

Expected: DATABASE_URL should be injected into the process env as postgresql://...@postgres.railway.internal:5432/railway.

Actual: variable is absent from os.environ entirely at runtime.

Solved

1 Replies

Railway
BOT

a month ago

Your DATABASE_URL variable on the web service is currently staged but not committed. The committed config for that service has 9 variables and DATABASE_URL is not among them. To apply it, use the "Deploy" button in the staged changes banner on the project canvas rather than triggering a redeploy, as a manual redeploy re-runs the existing committed config without picking up staged edits.


Status changed to Awaiting User Response Railway • 27 days ago


Railway
BOT

20 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 20 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...