-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.62 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
# Production stack: the face service behind Caddy (automatic HTTPS via Let's Encrypt).
# All runtime state (templates, index, keys, operators, tenants, usage, audit) lives
# on one named volume so it survives restarts/redeploys.
#
# 1) copy .env.example -> .env and fill it in (DOMAIN + secrets)
# 2) docker compose up -d --build
# 3) point your domain's DNS A/AAAA record at this server's IP
#
# Mint an API key: docker compose exec app python manage_keys.py create "App" --role verify
# Add an operator: docker compose exec app python manage_admins.py create alice
services:
app:
build: .
restart: unless-stopped
env_file: .env
environment:
# state is redirected onto the mounted volume (overrides app defaults)
FACE_DB_PATH: /data/face_db
FACE_KEYS_FILE: /data/apikeys.json
FACE_INVITES_FILE: /data/invites.json
FACE_ADMINS_FILE: /data/admins.json
FACE_TENANTS_FILE: /data/tenants.json
FACE_USAGE_FILE: /data/usage.json
FACE_AUDIT_DIR: /data/audit_logs
# issuer signing keys + credential registry MUST persist, or every restart
# regenerates keys and breaks all previously issued credentials (unknown_issuer)
BIO_ISSUER_KEY_DIR: /data/issuer
BIO_CREDENTIALS_DIR: /data/credentials
volumes:
- facedata:/data
expose:
- "7860"
caddy:
image: caddy:2
restart: unless-stopped
depends_on:
- app
env_file: .env
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddydata:/data
- caddyconfig:/config
volumes:
facedata:
caddydata:
caddyconfig: