Chaining custom start command with Dockerfile

fityannugrohoTRIAL

a year ago

I have a Dockerfile with CMD ["npm", "run", "start:prod"] and in docker-compose.yml, I set the command with sh -c "npm run db:migrate && npm run db:seed && npm run start:prod" to run database migration and seeder before run the app.

Since Railway doesn't support docker-compose yet, I tried to customize the Railway start command with npm run db:migrate && npm run start:prod but it didn't work. It seems that npm run start:prod command was never executed after the migration is completed.

So is it possible to chaining custom start command with Dockerfile in Railway?

0 Replies

Chaining custom start command with Dockerfile - Railway Help Station