What are the best practices with a second environment?
kevmok
PROOP

9 months ago

Hi there,

I am bit new when it comes to having multiple environments in the cloud, but I want to have a Dev environment in railway, but my question now is around this use case:

In our github repo, all PRs are against main we don't have a dev branch. Now I think I can setup the development environment to have it deploy my services with any changes to the main branch but when it comes to PROD, that's not ideal. I read that I can use github actions and the railway CLI to deploy, but the cli requires me to enter a svc_id but I have a monorepo so I really like using y'alls watch paths property to just deploy whatever has changed.
So my thoughts are either I just handle everything through github actions or can railway do something about it?

Solved

10 Replies

kevmok
PROOP

9 months ago

N/A


echohack
EMPLOYEE

9 months ago

there is a wait for CI option in the settings that will allow you to still use a watch path with github actions

You may want to consider having a dev/staging environment/branch and have the separate environment watch that branch

https://docs.railway.com/guides/github-autodeploys


kevmok
PROOP

9 months ago

How would wait for CI work? that would be for flows that are used on push events, but i only want to deploy to prod manually using workflow_dispatch events


kevmok
PROOP

9 months ago

Yeah I thought about having a dev branch, just wondering if there are any alternatives. We don't use dev branches in my repo but if it has to be that way then i guess that's it


kevmok
PROOP

9 months ago

oh can i use railway up?


echohack
EMPLOYEE

9 months ago

You can do it manually with github actions yes


echohack
EMPLOYEE

9 months ago

in other words you wouldn't use the github integration


echohack
EMPLOYEE

9 months ago

(or any other CI)


kevmok
PROOP

9 months ago

Yep. Ty


echohack
EMPLOYEE

9 months ago

!s


Status changed to Solved echohack 10 months ago


Loading...