Bundle Postgres in default stack

This commit is contained in:
Zachariah K. Sharma
2026-06-06 03:33:53 -06:00
parent d142603c12
commit e182259249
4 changed files with 24 additions and 42 deletions
+3 -10
View File
@@ -17,7 +17,7 @@ The app container runs `prisma migrate deploy` before starting the Next.js stand
```bash
APP_PORT=3000
DATABASE_URL=postgresql://user:password@postgres-host:5432/formbuilder
POSTGRES_PASSWORD=replace-with-a-strong-password
AUTH_SECRET=replace-with-openssl-rand-base64-32
AUTH_URL=https://forms.example.com
@@ -32,12 +32,6 @@ [email protected]
Optional values are documented in `.env.example` for Redis rate limiting, email, file storage, hCaptcha, and webhook worker auth.
If you do not already have Postgres, deploy with both Compose files and set `POSTGRES_PASSWORD`:
```bash
docker compose -f docker-compose.yml -f docker-compose.postgres.yml up --build
```
## Authentik Setup
Create an OAuth2/OpenID provider in Authentik:
@@ -54,12 +48,11 @@ The first successful signer becomes an admin. Any emails listed in `AUTH_BOOTSTR
## Persistent Data
The default compose stack creates one named volume:
The compose stack creates two named volumes:
- `postgres_data`: bundled Postgres database
- `uploads`: local uploaded files mounted at `/app/uploads`
When using `docker-compose.postgres.yml`, it also creates `postgres_data` for the bundled database.
For multi-instance deployments, set `RATE_LIMIT_DRIVER=redis` and provide `REDIS_URL`. For durable object storage outside the app container, configure the S3 values in `.env.example`.
## Useful Commands