-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose-external-pg.yml
49 lines (45 loc) · 1.39 KB
/
docker-compose-external-pg.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
---
version: '3.7'
volumes:
pmm-server-external-pg:
services:
pmm-server-external-postgres:
image: ${PMM_SERVER_IMAGE:-perconalab/pmm-server:dev-latest}
container_name: pmm-server-external-postgres
depends_on:
- create_extention
ports:
- '8081:80'
- '8444:443'
volumes:
- pmm-server-external-pg:/srv
environment:
- PMM_DEBUG=1
- PERCONA_TEST_POSTGRES_DBNAME=postgres
- PERCONA_TEST_POSTGRES_ADDR=external-postgres:5432
- PERCONA_TEST_POSTGRES_USERNAME=postgres
- PERCONA_TEST_POSTGRES_DBPASSWORD=externalPG^*&@
external-postgres:
image: ${POSTGRES_IMAGE:-perconalab/percona-distribution-postgresql:14}
container_name: external-postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
command: >
-c shared_preload_libraries=pg_stat_statements
-c pg_stat_statements.track=all
-c max_connections=200
environment:
- POSTGRES_PASSWORD=externalPG^*&@
create_extention:
image: ${POSTGRES_IMAGE:-perconalab/percona-distribution-postgresql:14}
container_name: create_extention
command: >
psql -Upostgres -hexternal-postgres -dpostgres -c 'CREATE EXTENSION IF NOT EXISTS pg_stat_statements;'
depends_on:
external-postgres:
condition: service_healthy
environment:
- PGPASSWORD=externalPG^*&@