I've been really happy with remix.run after some testing this week.
I deployed this site to fly.io and wanted to go through the steps of how I achieved this.
- Run the remix start command
npx create-remix@latest
- Set up Prisma, you can follow this guide but the commands are
npm install --save-dev prisma
npm install @prisma/client
# we want to use SQLite, its fast and simple
npx prisma init --datasource-provider sqlite
- Add some models to the
schema.prisma
file - Run this command to create the database
# should create a dev.db in the prisma directory
npx prisma db push
- Add the db files to
.gitignore
- Install the fly command line tools
brew install superfly/tap/flyctl
- Create a fly account
flyctl auth signup
- Launch the app
# make sure you don't deploy the app or add a PostgreSQL database
fly launch
- Check the
Dockfile
and that secrets are all set - Ensure that all migrations have been run
npx prisma migrate dev
- Deploy the app
# can run fly logs to see how build is going
fly deploy
- If you change the structure of your database you'll need to run
npx prisma migrate dev --name <name-of-migration>
as this ensures that the Prisma Client is updated.