Is it possible to run docker compose as a railway service
I have a fairly straightforward app running via docker compose. Is there way to get this to run on a railway service? I will post the dockerfile below. I expect I would have to make some changes to use private networking if that is the case.
17 Replies
Project ID:
b70c2b91-7e72-49ce-a124-ecb0f1d43ff9
b70c2b91-7e72-49ce-a124-ecb0f1d43ff9
Also, if this question has been answered, I would greatly appreciate a point in the right direction. Thanks.
railway does not support docker compose, and if it did, this file only has one environment variable?
Haha yes, it's more of a 'test' if you would. ENV vars are hardcoded
test or not, never hardcode variables, it creates fragile systems
mongo alone would need about 5 variables to be setup properly
I see. It is running with this configuration on my machine, but I imagine it would be different running in a railway environment>?
?*
running is one thing, running properly is a whole other ball game, for example mongo has no password, and your backend has no environment variable to tell it what mongo's hostname would be, same goes for redis, same also goes for the frontend, it doesnt have an environment variable to tell it the url of the backend
Well yes, again I was more interested in a quick test and this would never actually come close to production
or anything that anybody could use
before I could delete it
i understand, but i believe good practices should still be used, even for testing
besides, this compose file would be incredibly easy to translate manually into a project, youd spend the most time removing all the hardcoded stuff
Totally
I was like 90% on my way to getting the app up and running via compose, and lazily hardcoding got it running. Totally agree that good practices should be used in testing. Thanks for letting me know that compose is not supported via railway
It's an old application of mine, was trying to port for fun
well not yet at least, and im not sure how i feel about them adding support for it, after seeing this kind of compose file, no offense ❤️
hahaha
none taken
lol
i respect it
this is horrible secrets management
do not attempt at home
kids** if you're reading
i mean even supabase has a bad compose file, so its not even really your fault
that makes me feel a bit better
remove all the hardcoded stuff from in your code and then id be happy to help you get this up and running on railway
I'll come back to you
sounds good