Where are build releases run?

From what I see in your logs, you never got to the release step, it is the build step that failed. fly console is indeed the way to explore what an ephemeral machine looks like - it is created when you run that command, destroyed when you exit, and has access to your network and secrets.

Here is the error:

2024-10-28T16:10:55.5514290Z #10 55.47 @diet-it/web:build:    Generating static pages (0/12) ...
2024-10-28T16:10:56.5387062Z #10 56.46 @diet-it/web:build:    Generating static pages (3/12) 
2024-10-28T16:10:56.5388468Z #10 56.46 @diet-it/web:build:    Generating static pages (6/12) 
2024-10-28T16:10:56.9862661Z #10 56.91 @diet-it/web:build: Error occurred prerendering page "/status". Read more: https://nextjs.org/docs/messages/prerender-error
2024-10-28T16:10:56.9864628Z #10 56.91 @diet-it/web:build: PrismaClientInitializationError: 
2024-10-28T16:10:56.9866228Z #10 56.91 @diet-it/web:build: Invalid `prisma.$queryRaw()` invocation:
2024-10-28T16:10:56.9867363Z #10 56.91 @diet-it/web:build: 
2024-10-28T16:10:56.9868210Z #10 56.91 @diet-it/web:build: 
2024-10-28T16:10:56.9869449Z #10 56.91 @diet-it/web:build: error: Environment variable not found: DATABASE_URL.
2024-10-28T16:10:56.9870824Z #10 56.91 @diet-it/web:build:   -->  schema.prisma:601
2024-10-28T16:10:56.9871878Z #10 56.91 @diet-it/web:build:    | 
2024-10-28T16:10:56.9872915Z #10 56.91 @diet-it/web:build: 600 |   provider = "postgresql"
2024-10-28T16:10:56.9874686Z #10 56.91 @diet-it/web:build: 601 |   url      = env("DATABASE_URL")
2024-10-28T16:10:56.9875703Z #10 56.91 @diet-it/web:build:    | 

Rendering static pages will need access to the database, so this step too needs to be moved to the release machine. Unfortunately this is a bit more painful as you will also need to capture the prerendered output and load it on each server. The easiest way to do that is with Tigris. If this is of interest, I can talk you through this.

(Technically, this too could be run on the deployed machine, but that kinda defeats the purpose of prerendering).

It may be possible to serve static files directly from Tigris which would make things even easier. I can check on the status of this effort.