auto-run drizzle migrations on container startup

This commit is contained in:
2026-02-24 22:47:28 -05:00
parent ae9f081f90
commit 301e66f19f
2 changed files with 6 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ docker compose up --build -d
For local Docker, host port mapping comes from `docker-compose.override.yml` (default `http://localhost:3000`, configurable via `APP_PORT`).
The base Docker Compose now includes an internal PostgreSQL service (`postgres`) used by Better Auth by default.
On container startup, the app now applies Drizzle migrations automatically before launching Next.js.
For Coolify/remote Docker Compose, only app container port `3000` is exposed internally (no fixed host port bind), avoiding host port collisions.
If you use an external Postgres instance, set `DATABASE_URL` explicitly.
Runtime data persists in the `app_data` volume (`/app/data` in container).