Add railway.json config and update Dockerfile entrypoint to run migrations before starting the server.
13 lines
292 B
JSON
13 lines
292 B
JSON
{
|
|
"$schema": "https://railway.com/railway.schema.json",
|
|
"build": {
|
|
"builder": "DOCKERFILE",
|
|
"dockerfilePath": "Dockerfile"
|
|
},
|
|
"deploy": {
|
|
"startCommand": "/app/bin/migrate && /app/bin/server",
|
|
"restartPolicyType": "ON_FAILURE",
|
|
"restartPolicyMaxRetries": 10
|
|
}
|
|
}
|