Additional Command when deploying

I want my deployment to attempt to migrate the database whenever there's a new deployment, the command needed to run is ./vendor/bin/phinx migrate How do I set that?
Solution:
yes, now you can update your start command in the service settings with the following format -
<your migration command> && <your original start command>
<your migration command> && <your original start command>
sans angle brackets...
Jump to solution
19 Replies
Percy
Percy7mo ago
Project ID: b01880bc-a5fa-4f41-b977-800d4b3367ef
Croissant
CroissantOP7mo ago
b01880bc-a5fa-4f41-b977-800d4b3367ef
Brody
Brody7mo ago
how do you currently set a start command? nixpacks or Dockerfile?
Croissant
CroissantOP6mo ago
nixpacks
Brody
Brody6mo ago
what's your current start command? and where have you set it?
Croissant
CroissantOP6mo ago
I didn't set it, I use the default
Brody
Brody6mo ago
what is the start command that's being used
Croissant
CroissantOP6mo ago
um how can I check it?
Brody
Brody6mo ago
the build table at the top of the build logs
Croissant
CroissantOP6mo ago
{ "$schema": "https://railway.app/railway.schema.json", "build": { "builder": "NIXPACKS" }, "deploy": { "numReplicas": 1, "sleepApplication": false, "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 } } uh this?
Brody
Brody6mo ago
no
Croissant
CroissantOP6mo ago
Perhaps you can check my deployment ID: 2774c7ec-82f8-4c03-9263-4983a9fe6df5 this?
Brody
Brody6mo ago
I can't, I don't work for railway
Croissant
CroissantOP6mo ago
omo, i thought you work with them they should hire you tbh heh
Solution
Brody
Brody6mo ago
yes, now you can update your start command in the service settings with the following format -
<your migration command> && <your original start command>
<your migration command> && <your original start command>
sans angle brackets
Croissant
CroissantOP6mo ago
./vendor/bin/phinx migrate && node /assets/scripts/prestart.mjs /app/nginx.template.conf/nginx.conf && (php-fpm -y /assets/php-fpm.conf & nginx -c/nginx.conf) like this?
Brody
Brody6mo ago
correct
Croissant
CroissantOP6mo ago
Thanks
Brody
Brody6mo ago
no problem! did that work for you?
Want results from more Discord servers?
Add your server