-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
61 lines (60 loc) · 1.66 KB
/
docker-compose.yml
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
version: "3.7"
services:
db:
image: postgres:16.2
restart: unless-stopped
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=makeSUREtoREPLACEthis
volumes:
# allow database replication with authentication
- ./scripts/pg_replica/pg_hba_init.sh:/docker-entrypoint-initdb.d/pg_hba_init.sh:ro
# ensure pg_hba.conf is set
command: /docker-entrypoint-initdb.d/pg_hba_init.sh docker-entrypoint.sh postgres
shm_size: ${DB_SHM_SIZE:-64mb}
ulimits:
nofile:
soft: 20000
hard: 40000
pgbouncer:
image: edoburu/pgbouncer:1.21.0-p2
restart: unless-stopped
environment:
- DB_HOST=db
- DB_USER=postgres
- DB_PASSWORD=makeSUREtoREPLACEthis
- DB_NAME=postgres
- MAX_CLIENT_CONN=2000
- DEFAULT_POOL_SIZE=2000
- CLIENT_IDLE_TIMEOUT=3600
- AUTH_TYPE=scram-sha-256
ulimits:
nofile:
soft: 20000
hard: 40000
depends_on:
- db
redis:
image: redis:7.2.4
restart: unless-stopped
deploy:
replicas: ${REDIS_REPLICAS:-1}
tph:
# This is a dummy image name to allow `docker-compose` commands without
# specifying multiple compose files when the containers are already up.
# This is overridden in the specialized compose files.
image: tph
environment:
- SECRET_KEY=makeSUREtoREPLACEthis
- POSTGRES_HOST=pgbouncer
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=makeSUREtoREPLACEthis
- REDIS_HOST=redis
- ENABLE_BACKEND=true
- SERVE_FIXTURES=false
depends_on:
- db
- pgbouncer
- redis