-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (45 loc) · 1.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
47 lines (45 loc) · 1.53 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
services:
whook:
build: .
image: whook:latest
ports:
- "8080:8080"
environment:
WHOOK_ADDR: ":8080"
# Defaults to the bundled SQLite. To use Postgres, start the optional
# service below and set WHOOK_DATABASE_URL to its DSN, for example:
# WHOOK_DATABASE_URL=postgres://whook:whook@postgres:5432/whook?sslmode=disable
WHOOK_DATABASE_URL: "${WHOOK_DATABASE_URL:-file:/data/whook.db?_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)}"
# Set these in a .env file or your shell. Empty admin token leaves the
# management API open, which is only safe for local use.
WHOOK_ADMIN_TOKEN: "${WHOOK_ADMIN_TOKEN:-}"
WHOOK_SECRET_KEY: "${WHOOK_SECRET_KEY:-}"
WHOOK_WORKERS: "${WHOOK_WORKERS:-4}"
volumes:
- whook-data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/healthz"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
# Optional Postgres backend. Enable with: docker compose --profile postgres up
postgres:
image: postgres:16-alpine
profiles: ["postgres"]
environment:
POSTGRES_USER: "${POSTGRES_USER:-whook}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-whook}"
POSTGRES_DB: "${POSTGRES_DB:-whook}"
volumes:
- whook-pg:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "whook"]
interval: 10s
timeout: 5s
retries: 5
volumes:
whook-data:
whook-pg: