Question: Is it possible to setup Secret Files with Blueprint specs in render? I see no mention of this in the documentation
Why: I utilize Prisma and whenever we push a new version, a migration has to apply a new schema to the DB if there is one. This requires us to have access to the DATABASE_URL at build time. From my knowledge this means we must use a Secret File instead of Env Vars in Render. We are currently utilizing Blueprint but must manually configure the Secret Files after the build fails the first time syncing with the Blueprint.
Here is a small snippet of our Dockerfile to help understand how we’re currently going about it. Of course the build fails the first time because when running the first command to copy the secret file, its not present; thus failing the migration.
RUN --mount=type=secret,id=_env,dst=/etc/secrets/.env echo /etc/secrets/.env > apps/api/.env
RUN mv .env apps/api/.env
RUN pnpm api:build
RUN pnpm api:migrate