Build and Deploy Efficiency
jeffhatt
PROOP

21 days ago

I was wondering if it was possible to have multiple services tied to the same repository and build process - and have variant runners spun up from the same build? I am running a MedusaJS instance, and the server and worker both run off of the same build process, but with different environment variables. Because of this, when changes are made to the backend code, one build occurs for the server and another for the worker, when they both could be using the same image.

I would love it if there were some dependency constraints to build the server/worker once, then spawn a server instance and a worker instance based on the same build (possibly staggering the deploy to wait until the server is up before spawning the worker).

This is probably possible if I configure a Dockerfile in my repo to generate the artifact for the image and use Railway to deploy that image, but I like the railpack approach used and would like to keep it managed within Railway (instead of GitHub Actions and Packages).

1 Replies

brody
EMPLOYEE

14 days ago

This isn’t something Railway currently supports—each service runs its own build process, so sharing a single build artifact between multiple services isn’t possible.

If this is a workflow you’d like to see natively supported, please consider submitting it as a feature request here: https://station.railway.com/feedback. We’re always looking to improve the platform based on user feedback!


Loading...