Additional Command when deploying
jer-tan
HOBBYOP

2 years ago

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?

24 Replies

jer-tan
HOBBYOP

2 years ago

b01880bc-a5fa-4f41-b977-800d4b3367ef


brody
EMPLOYEE

2 years ago

how do you currently set a start command?

nixpacks or Dockerfile?


jer-tan
HOBBYOP

2 years ago

nixpacks


brody
EMPLOYEE

2 years ago

what's your current start command? and where have you set it?


jer-tan
HOBBYOP

2 years ago

I didn't set it, I use the default


brody
EMPLOYEE

2 years ago

what is the start command that's being used


jer-tan
HOBBYOP

2 years ago

um how can I check it?


brody
EMPLOYEE

2 years ago

the build table at the top of the build logs


jer-tan
HOBBYOP

2 years ago

{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}


jer-tan
HOBBYOP

2 years ago

uh this?


brody
EMPLOYEE

2 years ago

no


jer-tan
HOBBYOP

2 years ago

Perhaps you can check my deployment ID: 2774c7ec-82f8-4c03-9263-4983a9fe6df5


jer-tan
HOBBYOP

2 years ago

1242513337757995300


jer-tan
HOBBYOP

2 years ago

this?


brody
EMPLOYEE

2 years ago

I can't, I don't work for railway


jer-tan
HOBBYOP

2 years ago

omo, i thought you work with them


jer-tan
HOBBYOP

2 years ago

they should hire you tbh


jer-tan
HOBBYOP

2 years ago

heh


brody
EMPLOYEE

2 years ago

yes, now you can update your start command in the service settings with the following format -

 && 

sans angle brackets


jer-tan
HOBBYOP

2 years 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)


jer-tan
HOBBYOP

2 years ago

like this?


brody
EMPLOYEE

2 years ago

correct


jer-tan
HOBBYOP

2 years ago

Thanks


brody
EMPLOYEE

2 years ago

no problem! did that work for you?


Loading...