Skip to content

Conversation

henrygr
Copy link
Member

@henrygr henrygr commented Nov 22, 2026

Summary

  • Load apps/backend/.env in the VM systemd unit (and set PORT) so pnpm start receives DATABASE_URL. The production start script no longer loads dotenv itself.
  • Make Azure registry login robust: request an ACR token with az acr login --expose-token and pass it to docker login, instead of relying on az acr login to find the Docker CLI.
  • Check Docker/buildx on the self-hosted runner before the Azure build, and prune local images/build cache after pushing to ACR.
  • Fix the Docker image build: check in the generated Pothos types and run only the Prisma client generator in the image. The prisma-pothos-types generator hangs inside Docker after writing its output, which blocked the Azure build.
  • Document the runner Docker requirement (28.x) and how/when to regenerate the checked-in Pothos types.

Validation

  • VM deploy workflow run 88154 passed end-to-end from this branch, including the backend/frontend verification step.
  • Built both Docker images on the VM with Docker 28.5.2. The backend container served { __typename }, and the frontend served HTTP 200 and proxied /graphql correctly.
  • Live VM endpoints remain healthy after the deploy.
  • The Azure workflow cannot be dispatched from this branch because its OIDC federated identity is scoped to main. The Docker build path was validated locally; the first post-merge run will exercise the Azure login/deploy steps.

- systemd backend unit on the VM now reads apps/backend/.env, since the
  production start script does not load dotenv.
…ment

Use an exposed ACR token with docker login instead of letting az acr login
probe for Docker. Check Docker and buildx before the build, pin the runner
to Docker 28.x, and prune the local image/build cache after each push.
The prisma-pothos-types generator hangs inside Docker after writing its
output, leaving the build stuck at the generation step. Generate only the
Prisma client in the image and check in the generated Pothos types, which
are deterministic from the schema. Adjust ignore rules so that single file
is included in git and the Docker build context, and document regenerating
it with pnpm db:generate after schema changes.
@henrygr henrygr requested a review from a team as a code owner November 22, 2026 15:46
@henrygr henrygr self-assigned this Nov 22, 2026
@henrygr henrygr enabled auto-merge (squash) November 22, 2026 15:55
@henrygr henrygr merged commit 82c8a93 into main Nov 22, 2026
2 of 3 checks passed
@henrygr henrygr deleted the fix/deploy-env-and-acr-login branch November 22, 2026 16:17
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants