Skip to content

fix: package alpha prisma database#163

Merged
JustAGhosT merged 1 commit into
mainfrom
agent/package-alpha-prisma-db
Jul 19, 2026
Merged

fix: package alpha prisma database#163
JustAGhosT merged 1 commit into
mainfrom
agent/package-alpha-prisma-db

Conversation

@JustAGhosT

Copy link
Copy Markdown
Collaborator

Summary

  • generate Prisma Client during the Azure Web App build workflow
  • create the SQLite alpha database from the Prisma schema in CI
  • package the generated database into the standalone deployment artifact

Why

Alpha App Service auth persistence needs the SQLite database file present in the deployed package when using the current SQLite-backed Prisma setup.

Validation

@JustAGhosT
JustAGhosT marked this pull request as ready for review July 19, 2026 13:52
@JustAGhosT
JustAGhosT merged commit 4b34976 into main Jul 19, 2026
7 checks passed
@JustAGhosT
JustAGhosT deleted the agent/package-alpha-prisma-db branch July 19, 2026 13:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f71cae0deb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +85 to +87
# Copy Prisma SQLite bootstrap database for alpha App Service auth persistence.
mkdir -p deploy/prisma
cp prisma/omnipost.db deploy/prisma/omnipost.db

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Put the SQLite DB outside the mounted package

This copies the database into the deployment ZIP, but the dev App Service is configured with WEBSITE_RUN_FROM_PACKAGE = "1" and WEBSITES_ENABLE_APP_SERVICE_STORAGE = "false" in infra/terraform/env/dev/main.tf, so Azure mounts wwwroot from the ZIP as a read-only package (per https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package). When /api/auth registers users or writes audit rows through Prisma, SQLite will need to write to this file and will fail instead of providing the intended auth persistence; initialize/copy the DB into a writable persistent location and point DATABASE_URL there instead of packaging it under wwwroot.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant