R
Railway•10mo ago
70

server deployment

error: [prestart:error] Usage: /assets/scripts/prestart.mjs <config-file> <output-file> after custom deployment command. I would like to add anotherstart command apart from the default ones is that possble if so how
17 Replies
Percy
Percy•10mo ago
Project ID: 5a0ee64c-4acb-4b7a-a156-b53fd08e9edd
70
70OP•10mo ago
5a0ee64c-4acb-4b7a-a156-b53fd08e9edd
Brody
Brody•10mo ago
what command would you like to add
70
70OP•10mo ago
node cron.js
Brody
Brody•10mo ago
is this a php or a node app?
70
70OP•10mo ago
php
Brody
Brody•10mo ago
whats with node then?
70
70OP•10mo ago
node /assets/scripts/prestart.mjs /assets/nginx.template.conf && (php-fpm -y /assets/php-fpm.conf & nginx -c /nginx.conf) && (node cron.js&) current start command oh its for a cronjob in the background
Brody
Brody•10mo ago
what does the cron job do?
70
70OP•10mo ago
checks something in the db
Brody
Brody•10mo ago
then you want a seprate railway service that only runs that cron job
70
70OP•10mo ago
how nd why
Brody
Brody•10mo ago
how: create a new railway service in the same project, have it deploy from the same repo, and set the start command to node cron.js why: because its a separate task, it should be ran in a separate service
70
70OP•10mo ago
ok ty i was thinking abt that but thought there was an easier wey 😄
Brody
Brody•10mo ago
this is the easy way
70
70OP•10mo ago
okay thanks 6 am time to sleep gn brody thanks again
Brody
Brody•10mo ago
happy to help!
Want results from more Discord servers?
Add your server