Start an instance when deploying app on railway
My app requires program to start an instance of huey object (module similar to Celery) before starting the Flask application. Does railway have a place where I can run a command during deployment process?
9 Replies
Project ID:
N/A
N/A
to elaborate
this is my cwd and to run app on local machine (not on railway), I have to run the command "huey_consumer start_huey.run" in one terminal and "py run.py" in another terminal
is there a way I can do this when deploying on railway?
I'm assuming you would need to add a RUN command in dockerfile?
this is my current dockerfile
could someone help pls
if Huey is anything like celery you absolutely don't want it to be ran during build because that's a long lived process, you would want to run it in a separate railway service
kk
i was able to run it in the end using a supervisor
that works too, fwiw a separate railway service is the preferred method
ahh i see thank you!
no problem!