Hey all, I ran into a nasty Prisma migration that failed in prod. I had no real data in prod yet so I decided to just recreate the database. I then ran into issues re-attaching to the app so I ended up destroying the app too and just starting all over. The app is a Remix app, using Prisma, and a Postgres database.
Now if I do the following:
- create postgres
- proxy to postgres
- run prisma migrate
- create app
- attach postgres to app
Everything succeeds up to this point. If I then try either a fly launch or push a commit to my repo to trigger a deploy the deploy fails saying that the app can’t connect to the db during the prisma migration step.
--> This release will not be available until the release command succeeds.
Starting instance
Configuring virtual machine
Pulling container image
Unpacking image
Preparing kernel init
Starting virtual machine
Starting init (commit: 08b4c2b)...
Preparing to run: `docker-entrypoint.sh pnpx prisma migrate deploy` as root
2023/02/25 17:26:11 listening on [fdaa:0:8aa8:a7b:a6:242b:9d2:2]:22 (DNS: [fdaa::3]:53)
.../share/pnpm/store/v3/tmp/dlx-522 | Progress: resolved 1, reused 0, downloaded 0, added 0
Starting instance
Configuring virtual machine
Pulling container image
Unpacking image
Preparing kernel init
Configuring firecracker
Starting virtual machine
Starting init (commit: 08b4c2b)...
Preparing to run: `docker-entrypoint.sh pnpx prisma migrate deploy` as root
2023/02/25 17:26:11 listening on [fdaa:0:8aa8:a7b:a6:242b:9d2:2]:22 (DNS: [fdaa::3]:53)
.../share/pnpm/store/v3/tmp/dlx-522 | Progress: resolved 1, reused 0, downloaded 0, added 0
.../share/pnpm/store/v3/tmp/dlx-522 | Progress: resolved 2, reused 0, downloaded 1, added 1
.../share/pnpm/store/v3/tmp/dlx-522 | Progress: resolved 2, reused 0, downloaded 1, added 1
.../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
.../share/pnpm/store/v3/tmp/dlx-522 | Progress: resolved 2, reused 0, downloaded 2, added 2, done
.../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
.../share/pnpm/store/v3/tmp/dlx-522 | Progress: resolved 2, reused 0, downloaded 2, added 2, done
.../node_modules/@prisma/engines postinstall: Done
.../node_modules/@prisma/engines postinstall: Done
.../prisma@4.10.1/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
.../prisma@4.10.1/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
.../prisma@4.10.1/node_modules/prisma install$ node scripts/install-entry.js
.../prisma@4.10.1/node_modules/prisma install$ node scripts/install-entry.js
.../prisma@4.10.1/node_modules/prisma install: Done
.../prisma@4.10.1/node_modules/prisma install: Done
Prisma schema loaded from prisma/schema.prisma
Error: P1001: Can't reach database server at `[fdaa:0:8aa8:0:1::4]`:`5432`
ERROR Command failed with exit code 1: prisma migrate deploy
pnpm: Command failed with exit code 1: prisma migrate deploy**strong text**
I have verified the address is correct for the database.