Initial database setup in Railway
What's the best practice for setting up initially the database users in Railway?
I've tried creating a service that runs only migrations, but running ... triggers the following:
ERROR: Graphile Starter must run inside of a git versioned folder.
Which makes me believe that CONFIRM_DROP=true yarn setup:db is not intended ever for the prod db
What is Railway?
No, you should not drop in production. There are instructions on deploying to Heroku here:
https://github.com/graphile/starter#deploying-to-heroku
Deploying to other environments would have similarities.
The documentation just says to use Amazon RDS, nothing about setting up the initial users, structure.
In an automated, continuous delivery environment, what's the recommendation for setting the db structure?
After following the setup instructions following the link above, on every release you should run:
yarn db migrate
as done in our Procfile for Heroku:
https://github.com/graphile/starter/blob/0b68eabc8ed414029594f40ca7bdcd8b46e17cb6/Procfile#L3