9 months ago
that's my current infra, all these containers use the SAME image for deploy
the question is: how to build and reuse the same image for all 6 containers instead building 6 times? like make no sense wait for build slots and also i'm overusing resources that don't needs
today the github merge triggers the deploy, i would love some help to improve my pipeline, thanks!
Pinned Solution
9 months ago
Railway doesn't have this. So use the github action pipeline to build the image and use that in the railway containers.
8 Replies
9 months ago
It's not possible to have multiple services use the same container. If you want all your apps to run in the same container, put them all in the same service
9 months ago
If you need all your services to wait for the others to deploy, set up a healthcheck function that waits for all your services to deploy before swapping deployments
9 months ago
you didn't understand my question, for some reason the discord didn't attached the file and i attached again
i have these 6 containers SHARING the same IMAGE ( its the same laravel php code ), but every container executes a different command, like:
cronjobs
backend api
workers redis
workers rabbitmq
workers for specific and huge consuming cpu tasks
monitoring
the question is: when i merge a pull request to main, this triggers 6 deploys to railway, i would like to have just 1 build instead 6, this is possible/configurable? that's the question!
thanks.
Attachments
the idea is to solve this situation, i triggered a deploy and i dont want to build 6 times, only 1 and share the image builded, railway has this or should i use a github action pipeline to build and use the latest image in railway containers <:thinkies:1238577143466692739> ?

9 months ago
Railway doesn't have this. So use the github action pipeline to build the image and use that in the railway containers.
9 months ago
I do understand the question, Railway does not support this. The above comment would work, if you’re willing to put work into it
Status changed to Solved chandrika • 9 months ago
9 months ago
!s