2 years ago
I'm not able to deploy logto on railway, I've deployed and seeded the DB as described in the docs before deployment using Logto global CLI but it keeps throwing error for DB alternation.
Docs: https://docs.logto.io/logto-oss/get-started-with-oss
DB Alternation Docs: https://docs.logto.io/logto-oss/using-cli/database-alteration
16 Replies
2 years ago
This seems like you haven't run the commands described in the database alteration docs.
Status changed to Awaiting User Response Railway • over 1 year ago
2 years ago
I've added that in dockerfile also, and tried to deploy from updated docker file but it's not working.
Status changed to Awaiting Railway Response Railway • over 1 year ago
2 years ago
Can I see what the Dockerfile looks like?
Status changed to Awaiting User Response Railway • over 1 year ago
Status changed to Awaiting Railway Response Railway • over 1 year ago
2 years ago
- why are you not using this?
npx @logto/cli db alteration deploy - Run Docker locally with this and check the results
Status changed to Awaiting User Response Railway • over 1 year ago
2 years ago
Sure.
Status changed to Awaiting Railway Response Railway • over 1 year ago
2 years ago
I tried, locally it's working but not on railway.
2 years ago
Can you please help me with a template or something? I exposes two ports, 3001 & 3002, I feel, railway is not able to expose the ports properly.
2 years ago
2 years ago
Looks like npm run alteration deploy is never exiting and thus preventing the server from starting.
2 years ago
In deploy logs, you can see it has exited with info Found 0 alteration to deploy
Attachments
2 years ago
You are correct, my apologies for the incorrect assignment.
I see that the start command needed to be wrapped in a shell because && is shell specific.
The deployment now runs both commands, yet logoto still says there are undeployed database alterations despite the previous printout saying there are no alterations to deploy.
Unfortunately, this is where my knowledge runs out, I think you could get better help with logto from the logto community or developers than I could provide you with.
2 years ago
Hi Brody,
Issue with undeployed database alterations is resolved, but it seems railway is still not able to recognize the ports allocated to the respective domains.
2 years ago
Hmmm, I'm not sure why you say that, from your latest deployment -
error Found undeployed database alterations, you must deploy them first by npm run alteration deploy command.And the deployment, despite saying active has exited.