Skip to content
How to initialize one service without deploying other staged services?
morrisonkamoi-png
OP

a month ago

I’m running a production FastAPI application and PostgreSQL database on Railway Hobby.

I’ve created an additional service called db-backup-worker, but it has no active service instance yet.

Its GitHub source, custom Dockerfile path (/Dockerfile.backup), and environment variables are staged.

The project also contains six unrelated staged environment-variable changes for my existing production web application.

Clicking the worker’s individual “Deploy the repo” action returned “There was an error deploying from source,” without creating a deployment record.

I need to initialize and deploy only db-backup-worker, without applying the staged web-service changes or redeploying the production application.

Does Railway support activating the worker’s source and custom Dockerfile configuration independently?

Would committing staged changes without deployment using Alt+Deploy safely initialize the service, or does that require an existing service instance?

Can the Railway CLI’s service source connect command accomplish this without automatically deploying the default Dockerfile?

What is the recommended procedure?

$10 Bounty

1 Reply

Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 1 month ago


a month ago

I need to initialize and deploy only db-backup-worker, without applying the staged web-service changes or redeploying the production application.

You'd need to save your six changes somewhere on a notepad, then clear them (via Details -> X), deploy the stages db-backup-worker and then reapply the six staged changes if you need it to remain stages. Unfortunately I don't think there's a way to only deploy the db-backup-worker without applying the rest of your staged changes.

Does Railway support activating the worker’s source and custom Dockerfile configuration independently?

Yes, you can set RAILWAY_DOCKERFILE_PATH to target a specific Dockerfile configuration for your worker

Would committing staged changes without deployment using Alt+Deploy safely initialize the service, or does that require an existing service instance?

Yes, Alt+Deploy commits the changes without redeploying anything so production should remain untouched. You can do it while watching production and abort any builds that go through if something goes wrong. But Alt + Delpoy is the documented way to commit changes without redeploying anything.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...