You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,13 @@ Official Docker image builder for [pretalx](https://github.com/pretalx/pretalx),
21
21
-`POSTGRES_PASSWORD`: A secure database password
22
22
-`PRETALX_SECRET_KEY`: A random secret key (generate with `openssl rand -base64 32`)
23
23
-`PRETALX_SITE_URL`: Your site URL (e.g., `https://pretalx.example.com`)
24
+
-`COMPOSE_PROFILES=local-db`: Keeps the bundled PostgreSQL service enabled (default). Clear the value to use an external database and set `POSTGRES_HOST`.
24
25
25
26
4.**Start the services**
26
27
```bash
27
28
docker compose up -d
28
29
```
30
+
With `COMPOSE_PROFILES=local-db` this launches the bundled PostgreSQL container. If you cleared the profile and set `POSTGRES_HOST`, the stack connects to your external database instead.
29
31
30
32
5.**Create a superuser**
31
33
```bash
@@ -60,6 +62,14 @@ docker run -d -p 8000:8000 \
60
62
61
63
See [.env.example](.env.example) for all available configuration options.
62
64
65
+
#### Database Options
66
+
-`COMPOSE_PROFILES=local-db`: Start the bundled PostgreSQL service (default). Clear the value to disable the container and connect to an external database.
67
+
-`POSTGRES_HOST`: PostgreSQL hostname (default: `db`). When you disable the bundled database, set this to your external host.
68
+
-`POSTGRES_PORT`: PostgreSQL port (default: `5432`)
69
+
-`POSTGRES_DB`: Database name (default: `pretalx`)
70
+
-`POSTGRES_USER`: Database user (default: `pretalx`)
@@ -88,9 +98,16 @@ The Docker Compose setup includes:
88
98
-**migrate**: One-time migration service (runs before other services)
89
99
-**web**: Gunicorn WSGI server on port 8000
90
100
-**worker**: Celery background task worker
91
-
-**db**: PostgreSQL 15 database
101
+
-**db**: PostgreSQL 15 database (enabled when `COMPOSE_PROFILES` includes `local-db`)
92
102
-**redis**: Redis for caching and Celery
93
103
104
+
### Using an External PostgreSQL Database
105
+
106
+
1. Edit `.env`, clear the `COMPOSE_PROFILES` value (or comment it out) so the bundled `db` service is not started.
107
+
2. Set `POSTGRES_HOST` (and optionally `POSTGRES_PORT`) to point at your external database.
108
+
3. Ensure `POSTGRES_DB`, `POSTGRES_USER`, and `POSTGRES_PASSWORD` match the external database credentials.
109
+
4. Start the stack with `docker compose up -d`. Docker Compose skips the `db` service automatically, and migrate/web/worker wait until they can connect to the external database.
0 commit comments