-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (58 loc) · 2.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (58 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
services:
# Default service — self-contained, SQLite-backed (Node's built-in node:sqlite driver, no
# native compilation, no extra service to run). Just set the two required env vars below and
# `docker compose up` works.
consenti:
build:
context: ./docker
ports:
- '3000:3000'
environment:
CONSENTI_ADMIN_EMAIL: admin@example.com
CONSENTI_ADMIN_PASSWORD: ${CONSENTI_ADMIN_PASSWORD:?set a real password, 16+ chars recommended}
CONSENTI_ADMIN_MASTER_SECRET: ${CONSENTI_ADMIN_MASTER_SECRET:?set a random secret, e.g. openssl rand -hex 32}
CONSENTI_DB_DRIVER: node:sqlite
CONSENTI_DB_PATH: /data/consenti-data
volumes:
- consenti-data:/data
restart: unless-stopped
# ── PostgreSQL alternative ────────────────────────────────────────────────────
# To use Postgres instead of SQLite:
# 1. Uncomment this service and the `postgres-data` volume below.
# 2. On the `consenti` service above, change CONSENTI_DB_DRIVER to `postgresql`, remove
# CONSENTI_DB_PATH, and add:
# CONSENTI_DB_HOST: postgres
# CONSENTI_DB_DATABASE: consenti
# CONSENTI_DB_USER: consenti
# CONSENTI_DB_PASSWORD: ${POSTGRES_PASSWORD:?set a real password}
# 3. Add `depends_on: [postgres]` to the `consenti` service.
#
# postgres:
# image: postgres:16-alpine
# environment:
# POSTGRES_DB: consenti
# POSTGRES_USER: consenti
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set a real password}
# volumes:
# - postgres-data:/var/lib/postgresql/data
# restart: unless-stopped
# ── MongoDB alternative ───────────────────────────────────────────────────────
# To use MongoDB instead of SQLite:
# 1. Uncomment this service and the `mongo-data` volume below.
# 2. On the `consenti` service above, change CONSENTI_DB_DRIVER to `mongodb`, remove
# CONSENTI_DB_PATH, and add:
# CONSENTI_DB_URI: mongodb://consenti:${MONGO_PASSWORD:?set a real password}@mongodb:27017/consenti?authSource=admin
# 3. Add `depends_on: [mongodb]` to the `consenti` service.
#
# mongodb:
# image: mongo:7
# environment:
# MONGO_INITDB_ROOT_USERNAME: consenti
# MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:?set a real password}
# volumes:
# - mongo-data:/data/db
# restart: unless-stopped
volumes:
consenti-data:
# postgres-data:
# mongo-data: