-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
45 lines (41 loc) · 1.31 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
version: "3.5"
services:
db:
image: postgres:14.0-alpine3.14
restart: always
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c pg_stat_statements.max=10000 -c max_connections=200
env_file:
- .env
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- "$LOCAL_DATA_DIR:/var/lib/postgresql/data"
- ./src/tagpack/db/tagstore_schema.sql:/tmp/schema.sql
- ./postgres-conf.sql:/tmp/postgres-conf.sql:Z
- ./docker/init.sh:/docker-entrypoint-initdb.d/init.sh
ports:
- 5432:5432
shm_size: "2048mb"
bouncer:
image: bitnami/pgbouncer:1.17.0-debian-11-r14
restart: always
depends_on:
- db
environment:
- POSTGRESQL_USERNAME=${POSTGRES_USER_TAGSTORE}
- POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD_TAGSTORE}
- POSTGRESQL_HOST=db
- POSTGRESQL_DATABASE=${POSTGRES_DB}
- PGBOUNCER_DATABASE=${POSTGRES_DB}
- PGBOUNCER_AUTH_USER=${POSTGRES_USER}
- PGBOUNCER_STATS_USERS=${POSTGRES_USER}
- PGBOUNCER_PORT=6432
- PGBOUNCER_AUTH_TYPE=md5
- PGBOUNCER_SET_DATABASE_USER=yes
- PGBOUNCER_SET_DATABASE_PASSWORD=yes
- PGBOUNCER_IGNORE_STARTUP_PARAMETERS=extra_float_digits
ports:
- 6432:6432
networks:
default:
name: tagpack