Best way to manage projects and credits?
alltiagocom
HOBBYOP

16 days ago

I'm still new to Railway and "coding" in general, so I'm learning as I go. Now that my trial is over, I want to better manage my projects and credits.

I initially started with this structure in Railway:

Project > 2 environments ("production" and "development") and inside each environment I would have 1 service each, like this:

production environment > production service

development environment > development service

Since I've decided to use Codespaces server for my "dev" branch, which is way faster than waiting 3 minutes for Railway to build and deploy, I'm thinking of moving to a simpler workflow:

Project > 1 environment > 1 service (production)

Then when everything is working in Codespaces, for a final test in the same "infrastructure" that my production version will use, duplicate Railway's production service, connect it to my GitHub's "dev" branch, update the variables. Build and deploy.

If everything is working, delete that "development" service.

Is this a good workflow?

Regarding credits:

Does an empty project still use any credits? I would assume it doesn't, the same for empty environments, but I want to be 100% sure.

Is there a way to keep the development service without using credits? For example if I have the service, but it's not connected to my GitHub branch? That way I can keep the variables and all that? I asked Claude about this and I was told that I can achieve this by removing the deployment in the Deployments tab? I see the list of all deployments, some show as "Removed", some as "Failed" and then I see the one that's "Active". Is it enough to just remove the "Active" deployment to remove all files and not consume credits? How about the "Failed" ones" Are those somehow also consuming credits? I would assume they are not, but again, just want to make sure I fully understand how things work.

Hope someone can help me understand these things.

Thanks! raised_hands emoji

Solved

1 Replies

Railway
BOT

16 days ago

Empty projects and environments with no running services do not consume credits, as you are billed based on per-minute resource usage of running services. Removing the active deployment on a service (via the 3-dot menu on the deployment) stops it from consuming any resources, so that's a valid way to keep a service's configuration and variables without incurring cost. Failed and removed deployments do not consume credits either, only an "Active" deployment does. Your proposed workflow of developing in Codespaces and then duplicating the production service for a final test is entirely up to you, but the key thing to know is that you only pay for services that have an actively running deployment.


Status changed to Awaiting User Response Railway 16 days ago


Status changed to Solved alltiagocom 16 days ago


Loading...