-
Notifications
You must be signed in to change notification settings - Fork 131
/
docker-compose.yml
210 lines (199 loc) · 7.19 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
---
# version: '3.7' // Deprecated: see https://docs.docker.com/compose/compose-file/04-version-and-name/
services:
pmm-server:
profiles:
- pmm
image: ${PMM_CONTAINER:-perconalab/pmm-server:dev-container}
# build:
# context: .
# args:
# PMM_SERVER_IMAGE: ${PMM_SERVER_IMAGE:-perconalab/pmm-server:dev-latest}
# dockerfile: devcontainer.Dockerfile
container_name: pmm-server
hostname: pmm-server
networks:
- ${NETWORK:-default}
environment:
- PMM_RELEASE_PATH=/root/go/bin
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- ENABLE_DBAAS=${ENABLE_DBAAS:-0}
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY}
- AWS_SECRET_KEY=${AWS_SECRET_KEY}
- ENABLE_RBAC=${ENABLE_RBAC:-0}
- LESS_LOG_NOISE=1
- PERCONA_TEST_VERSION_SERVICE_URL=${PERCONA_TEST_VERSION_SERVICE_URL}
- DBAAS_VM_OP_CHANNEL=${DBAAS_VM_OP_CHANNEL}
- DBAAS_PXC_OP_CHANNEL=${DBAAS_PXC_OP_CHANNEL}
- DBAAS_PSMDB_OP_CHANNEL=${DBAAS_PSMDB_OP_CHANNEL}
- DBAAS_DBAAS_OP_CHANNEL=${DBAAS_DBAAS_OP_CHANNEL}
- DBAAS_ALLOW_UNSUPPORTED_OPERATORS=${DBAAS_ALLOW_UNSUPPORTED_OPERATORS:-0}
- PERCONA_TEST_DBAAS_PMM_CLIENT=${PERCONA_TEST_DBAAS_PMM_CLIENT}
# - PERCONA_TEST_PLATFORM_ADDRESS=https://check.localhost
# - PERCONA_TEST_PLATFORM_INSECURE=1
# - PERCONA_TEST_PLATFORM_PUBLIC_KEY=<public key>
# - PERCONA_TEST_TELEMETRY_INTERVAL=10s
# - PERCONA_TEST_TELEMETRY_DISABLE_START_DELAY=1
# - PERCONA_TEST_TELEMETRY_RETRY_BACKOFF=10s
# - PERCONA_TEST_PMM_CLICKHOUSE_ADDR=127.0.0.1:9000
# - PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm
# - PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000
# - PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2
# - PMM_DEBUG=1
# - PERCONA_TEST_CHECKS_FILE=/srv/checks/local-checks.yml
# - PERCONA_TEST_POSTGRES_ADDR=pg
# - PERCONA_TEST_POSTGRES_DBNAME=pmm-managed
# - PERCONA_TEST_POSTGRES_USERNAME=pmm-managed
# - PERCONA_TEST_POSTGRES_DBPASSWORD=pmm-managed
# - PERCONA_TEST_POSTGRES_SSL_MODE=verify-full
# - PERCONA_TEST_POSTGRES_SSL_CA_PATH=/tmp/certs/root.crt
# - PERCONA_TEST_POSTGRES_SSL_KEY_PATH=/tmp/certs/pmm-managed.key
# - PERCONA_TEST_POSTGRES_SSL_CERT_PATH=/tmp/certs/pmm-managed.crt
# - PERCONA_TEST_PMM_DISABLE_BUILTIN_POSTGRES=1
# - GF_DATABASE_SSL_MODE=verify-full
# - GF_DATABASE_CA_CERT_PATH=/tmp/certs/root.crt
# - GF_DATABASE_CLIENT_KEY_PATH=/tmp/certs/grafana.key
# - GF_DATABASE_CLIENT_CERT_PATH=/tmp/certs/grafana.crt
extra_hosts:
- host.docker.internal:host-gateway
# - portal.localhost:${PORTAL_HOST:-host-gateway}
# - check.localhost:${PORTAL_CHECK_HOST:-host-gateway}
# - pmm.localhost:${PORTAL_PMM_HOST:-host-gateway}
# - check-dev.percona.com:${PORTAL_PMM_HOST:-host-gateway}
# for delve
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
# see https://github.com/golang/go/wiki/LinuxKernelSignalVectorBug#what-to-do
ulimits:
memlock: 67108864
ports:
- ${PMM_PORT_HTTP:-80}:80
- ${PMM_PORT_HTTPS:-443}:443
# For headless delve
- ${PMM_PORT_DELVE:-2345}:2345
# PG
- ${PMM_PORT_PG:-15432}:5432
# VM
- ${PMM_PORT_VM:-9090}:9090
# CH
- ${PMM_PORT_CH_TCP:-11000}:9000
- ${PMM_PORT_CH_HTTP:-11123}:8123
volumes:
- ./:/root/go/src/github.com/percona/pmm
- ./Makefile.devcontainer:/root/go/src/github.com/percona/pmm/Makefile:ro # substitute Makefile in devcontainer
# caching
- go-modules:/root/go/pkg/mod
- root-cache:/root/.cache
# command: >
# bash -c "
# rm -rf /tmp/certs
# mkdir /tmp/certs
# cp -R /root/go/src/github.com/percona/pmm/managed/testdata/pg/certs/* /tmp/certs
# chown grafana:grafana /tmp/certs/*
# chmod 600 /tmp/certs/*
# /opt/entrypoint.sh
# "
# PMM with external ClickHouse DB
ch:
profiles:
- pmm-ch
image: ${CH_IMAGE:-clickhouse/clickhouse-server:22.6.9.11-alpine}
platform: linux/amd64
hostname: ${CH_HOSTNAME:-ch}
ports:
- ${CH_PORT:-9000}:9000
pmm-server-ch:
profiles:
- pmm-ch
depends_on:
- ch
image: ${PMM_CONTAINER:-perconalab/pmm-server:dev-container}
container_name: pmm-server
hostname: pmm-server
networks:
- ${NETWORK:-default}
environment:
- PMM_RELEASE_PATH=/root/go/bin
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- ENABLE_DBAAS=${ENABLE_DBAAS:-0}
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY}
- AWS_SECRET_KEY=${AWS_SECRET_KEY}
- ENABLE_BACKUP_MANAGEMENT=1
# - PERCONA_TEST_PLATFORM_ADDRESS=https://check.localhost
# - PERCONA_TEST_PLATFORM_INSECURE=1
# - PERCONA_TEST_PLATFORM_PUBLIC_KEY=<public key>
# - PERCONA_TEST_TELEMETRY_INTERVAL=10s
# - PERCONA_TEST_TELEMETRY_RETRY_BACKOFF=10s
# - PERCONA_TEST_TELEMETRY_DISABLE_START_DELAY=1
- PERCONA_TEST_PMM_CLICKHOUSE_ADDR=${CH_HOSTNAME:-ch}:9000
- PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm
- PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2
# - PMM_DEBUG=1
- PERCONA_TEST_DBAAS_PMM_CLIENT=perconalab/pmm-client:dev-latest
extra_hosts:
- host.docker.internal:host-gateway
# - portal.localhost:${PORTAL_HOST:-host-gateway}
# - check.localhost:${PORTAL_CHECK_HOST:-host-gateway}
# - pmm.localhost:${PORTAL_PMM_HOST:-host-gateway}
# - check-dev.percona.com:${PORTAL_PMM_HOST:-host-gateway}
# for delve
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
# see https://github.com/golang/go/wiki/LinuxKernelSignalVectorBug#what-to-do
ulimits:
memlock: 67108864
ports:
- ${PMM_PORT_HTTP:-80}:80
- ${PMM_PORT_HTTPS:-443}:443
# For headless delve
- ${PMM_PORT_DELVE:-2345}:2345
# PG
- ${PMM_PORT_PG:-15432}:5432
# VM
- ${PMM_PORT_VM:-9090}:9090
# CH
- ${PMM_PORT_CH_TCP:-11000}:9000
- ${PMM_PORT_CH_HTTP:-11123}:8123
volumes:
- ./:/root/go/src/github.com/percona/pmm
# - "../grafana/public:/usr/share/grafana/public"
- ./Makefile.devcontainer:/root/go/src/github.com/percona/pmm/Makefile:ro # change Makefile in devcontainer
# caching
- go-modules:/root/go/pkg/mod
- root-cache:/root/.cache
# PMM with external Postgres DB
pg:
profiles:
- pmm-pg
build:
context: ./managed/testdata/pg
args:
POSTGRES_IMAGE: ${POSTGRES_IMAGE:-postgres:14}
dockerfile: Dockerfile
container_name: pmm-pg
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-pmm-password}
ports:
- ${POSTGRES_PORT:-5432}:5432
command: |
postgres
-c shared_preload_libraries=pg_stat_statements
-c pg_stat_statements.max=10000
-c pg_stat_statements.track=all
-c pg_stat_statements.save=off
-c fsync=off
-c ssl=on
-c ssl_ca_file=/certs/root.crt
-c ssl_cert_file=/certs/server.crt
-c ssl_key_file=/certs/server.key
-c hba_file=/conf/pg_hba.conf
networks:
- ${NETWORK:-default}
volumes:
go-modules:
root-cache: