diff --git a/package.json b/package.json index c80f6f5..5d18728 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "dev": "keystone build --no-ui && npm run migrate && next dev", - "build": "keystone build --no-ui && next build", - "start": "npm run migrate && next start", + "build": "keystone build --no-ui && npm run migrate && next build", + "start": "next start", "lint": "next lint", "migrate:gen": "keystone build --no-ui && tsx features/keystone/view-order/generate-view-order.ts && keystone prisma migrate dev", "migrate": "prisma migrate deploy" diff --git a/railway.toml b/railway.toml new file mode 100644 index 0000000..9a46ca6 --- /dev/null +++ b/railway.toml @@ -0,0 +1,7 @@ +# Railway can't access internal databases during build, so we move +# npm run migrate from build to start command +[build] +buildCommand = "keystone build --no-ui && next build" + +[deploy] +startCommand = "npm run migrate && next start"