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:Jump to solution
yes, now you can update your start command in the service settings with the following format -
sans angle brackets...
19 Replies
Project ID:
b01880bc-a5fa-4f41-b977-800d4b3367ef
b01880bc-a5fa-4f41-b977-800d4b3367ef
how do you currently set a start command?
nixpacks or Dockerfile?
nixpacks
what's your current start command? and where have you set it?
I didn't set it, I use the default
what is the start command that's being used
um how can I check it?
the build table at the top of the build logs
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
uh this?
no
Perhaps you can check my deployment ID: 2774c7ec-82f8-4c03-9263-4983a9fe6df5
this?
I can't, I don't work for railway
omo, i thought you work with them
they should hire you tbh
heh
Solution
yes, now you can update your start command in the service settings with the following format -
sans angle brackets
./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?correct
Thanks
no problem! did that work for you?