-
Notifications
You must be signed in to change notification settings - Fork 238
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (63 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
67 lines (63 loc) · 1.64 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
62
63
64
65
66
67
services:
backend:
build:
context: .
dockerfile: Dockerfile
image: svix/svix-server
healthcheck:
test: ["CMD-SHELL", "svix-server healthcheck http://localhost:8071"]
interval: 1s
timeout: 1s
retries: 600
environment:
WAIT_FOR: "true" # We want to wait for the default services
SVIX_REDIS_DSN: "redis://redis:6379"
SVIX_DB_DSN: "postgresql://postgres:postgres@pgbouncer/postgres"
# SVIX_JWT_SECRET: "x" # IMPORTANT: uncomment and set a real JWT secret here.
ports:
- "8071:8071"
depends_on:
pgbouncer:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: "docker.io/postgres:13.4"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 1s
retries: 600
volumes:
- "postgres-data:/var/lib/postgresql/data/"
environment:
POSTGRES_PASSWORD: postgres
pgbouncer:
image: "docker.io/edoburu/pgbouncer:1.15.0"
healthcheck:
test: "pg_isready -h localhost"
interval: 30s
timeout: 10s
retries: 3
environment:
DB_HOST: "postgres"
DB_USER: "postgres"
DB_PASSWORD: "postgres"
MAX_CLIENT_CONN: 500
depends_on:
postgres:
condition: service_healthy
redis:
image: "docker.io/redis:7-alpine"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 1s
retries: 600
# Enable persistence
command: "--save 60 500 --appendonly yes --appendfsync everysec"
volumes:
- "redis-data:/data"
volumes:
postgres-data:
redis-data: