fix deployment by adding postgres service to base compose

This commit is contained in:
2026-02-24 14:02:49 -05:00
parent 52a4ab38d3
commit 468ea5f252
4 changed files with 31 additions and 25 deletions

View File

@@ -39,8 +39,9 @@ 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 local override also starts PostgreSQL and wires `DATABASE_URL` to `postgres://postgres:postgres@postgres:5432/fiscal_clone`.
For Coolify/remote Docker Compose, only container port `3000` is exposed internally (no fixed host port bind), avoiding host port collisions.
The base Docker Compose now includes an internal PostgreSQL service (`postgres`) used by Better Auth by default.
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).
Docker builds install the npm version from `NPM_VERSION` (default `latest`).
@@ -52,6 +53,9 @@ Use root `.env` or root `.env.local`:
# leave blank for same-origin API
NEXT_PUBLIC_API_URL=
DATABASE_URL=postgres://postgres:postgres@localhost:5432/fiscal_clone
POSTGRES_DB=fiscal_clone
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
BETTER_AUTH_SECRET=replace-with-a-long-random-secret
BETTER_AUTH_BASE_URL=http://localhost:3000
BETTER_AUTH_ADMIN_USER_IDS=