Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Pinned webhook-driven `prisma migrate deploy` and `prisma migrate status`
calls to `prisma/prisma.config.ts` so homelab deploys keep `DATABASE_URL`
resolution when run from the webhook container.

## [2.6.15] - 2026-03-14

### Added
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ contract success, instead of failing the rollout as a false negative.
Deploy webhook rollout now starts `postgres`/`redis`, runs
`prisma migrate deploy`, and executes a `guild_role_grants` relation preflight
before service rollout to fail fast on schema drift.
When those Prisma migration commands run from the webhook container, they must
pin `prisma/prisma.config.ts` (and `prisma/schema.prisma`) explicitly so the
deploy path keeps `DATABASE_URL` resolution deterministic.
CLOUDFLARED tunnel restarts now mount config from `CLOUDFLARED_CONFIG_DIR`
instead of shell `$HOME`; use a canonical host path like
`/home/luk-server/.cloudflared` to avoid deploy-context mount drift.
Expand Down
6 changes: 4 additions & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,16 @@ log "Starting database services..."
docker_compose up -d postgres redis

log "Running database migrations..."
if ! docker_compose run --rm --no-deps backend sh -lc "npx prisma migrate deploy"; then
if ! docker_compose run --rm --no-deps backend \
sh -lc "npx prisma migrate deploy --config prisma/prisma.config.ts --schema prisma/schema.prisma"; then
log "ERROR: prisma migrate deploy failed (migration execution error)"
notify 16711680 "Deploy Failed" "Database migration failed"
exit 1
fi

log "Checking migration status..."
if ! docker_compose run --rm --no-deps backend sh -lc "npx prisma migrate status"; then
if ! docker_compose run --rm --no-deps backend \
sh -lc "npx prisma migrate status --config prisma/prisma.config.ts --schema prisma/schema.prisma"; then
log "ERROR: prisma migrate status failed (migration drift/history mismatch)"
notify 16711680 "Deploy Failed" "Database migration status guard failed"
exit 1
Expand Down
Loading