-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
67 lines (63 loc) · 1.94 KB
/
docker-compose.yaml
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:
container_name: backend
image: postgres-explain/backend:latest
restart: on-failure
build:
dockerfile: backend.Dockerfile
args:
USER: backend
GROUP: postgres-explain
context: backend
environment:
CLUSTERS: mycluster,another
mycluster_CLUSTER_USERNAME: postgres
mycluster_CLUSTER_HOSTNAME: postgres_one
mycluster_postgres_CLUSTER_PASSWORD: postgres
CLICKHOUSE_HOST: clickhouse
AUTH_TYPE: disabled
LOG_LEVEL: debug
ports:
- "8082:8082"
postgres_one:
image: postgres:15
hostname: postgres_one
command: -c shared_preload_libraries='pg_stat_statements,auto_explain' -c auto_explain.sample_rate=1 -c auto_explain.log_min_duration=10000 -c auto_explain.log_analyze=true -c auto_explain.log_timing=true -c auto_explain.log_buffers=true -c auto_explain.log_verbose=true -c auto_explain.log_triggers=true -c auto_explain.log_settings=true -c auto_explain.log_nested_statements=true -c auto_explain.log_format=JSON
ports:
- "5432:5432"
container_name: postgres_one
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
volumes:
- ./misc/init.sql:/docker-entrypoint-initdb.d/init.sql
collector:
image: postgres-explain/collector:latest
container_name: collector
build:
dockerfile: collector/Dockerfile
context: .
environment:
DESTINATION_HOST: backend:8081
COLLECTOR_HOST: collector:8083
clickhouse:
image: clickhouse/clickhouse-server
container_name: clickhouse
ulimits:
nofile:
soft: 262144
hard: 262144
ports:
- "9001:9000"
- "8123:8123"
pgbench:
container_name: pgbench
image: borealis/pgbench:latest
build:
dockerfile: pgbench.Dockerfile
context: pg_bench
command: postgres_one
environment:
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: postgres