Init containers/side-car
Hi, I am moving my infrastructure from a cloud provider to Railway. I have a PHP Lumen API that poses 2 issues:
1. I need to run database migrations before deploying. Is there a feature such as init containers in K8s? I know I could also probably run the migrations in my Dockerfile by referencing the Database credentials.
2. Laravel/lumen also needs a worker process that runs in the background, how can I achieve that?
9 Replies
Project ID:
caec4df4-d593-4edd-a40b-bd8b2114a0f7
Project ID: caec4df4-d593-4edd-a40b-bd8b2114a0f7
I know I could also probably run the migrations in my Dockerfile by referencing the Database credentialsthats probably your best bet.
Laravel/lumen also needs a worker process that runs in the background, how can I achieve that?maybe something like supervisord?
My plan is to have this service be deployed from a CI/CD pipeline, could I maybe create another service and after deploying the main app switch to the worker railway service and deploy with another dockerfile that starts the queue?
sounds overly complicated
Is there a way to poll the status of the deployment when using --detach?
you can use the api for that, poll the deployment query, it will return a status field
awesome, thank you @Brody