#General Question - Are threads and workers supported in the Procfile?
47 messages · Page 1 of 1 (latest)
Project ID: N/A
N/A
wdym exactly? you'll run both the web and the worker service, right?
I see. But what if I want to run the worker service on the same deployed web service? I won't be having two procfiles in the same repo.
You can't do that
You need to split out the service into two services
here's an example: I want to run a celery queue for a django application, how do I do that given I have only one procfile at the root.
run 2 services
You delete the procfile and move those commands into the services
so essentially, i just create two services stemming from the same repo and define the worker or web command over here?
yes
alright gotcha, thanks a lot
do you have any plans to support running multiple services from a single deployment or is that against the pattern (i.e. every deployment is an independent service) you have at railway?
also, railway seems to detecting a dockerfile which is cool but what if I don't want to use the dockerfile? the option would be to use a procfile, right? but since you seemed to suggest that I'd have to delete the Procfile to run multiple services from the same repo, what are my options?
Rename the dockerfile to Dockerfile.prod or dev or something
If you wanna upvote you can do that there
aight will do
okay so i'm trying the two-service approach (one a background qcluster for a django app and the other a gunicon web service).
not the most cohesive way to run services imo but I'm glad it works!
I mean, otherwise your logs are gonna be totally useless
What do you suggest? They need to be split out
They’ll need to scale independently
true but coming from aws ecb, I recall they had logging for pretty much everything with the ability to run services from the procfile like I mentioned earlier.
or at least, there could be a way to "connect" services to existing services, perhaps? cause rn, I'm duplicating all my env variables for the other service to run (since it runs from the same app essentially just as a different service now).
When you duplicate them it should tell you about Project Variables
I'm unaware of that.
Interesting
CC @crystal sandal
So, if you add two of the same across services it doesn’t tell you that?
It should prompt you to convert it to a Project Variable
(Which you can access in project settings)
I went straight to the raw editor and this is what I got with an empty file when creating a new service.