This repository has been archived by the owner on Aug 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
88 lines (83 loc) · 2.48 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
version: '3.8'
services:
db-dev:
container_name: peak-it-2020-db-dev
image: postgres:12-alpine
healthcheck:
test: >
pg_isready \
--host=localhost \
--port=5432 \
--dbname=${DB_DEV_POSTGRES_DB_NAME} \
--username=${DB_DEV_POSTGRES_USER}
interval: "${DB_HEALTHCHECK_INTERVAL}"
timeout: "${DB_HEALTHCHECK_TIMEOUT}"
retries: ${DB_HEALTHCHECK_RETRIES}
start_period: "${DB_HEALTHCHECK_START_PERIOD}"
restart: unless-stopped
volumes:
- peak-it-2020-db-dev_data:/var/lib/postgresql/data
ports:
- "5432:5432/tcp"
networks:
- local_postgresql
environment:
- POSTGRES_USER=${DB_DEV_POSTGRES_USER}
- POSTGRES_PASSWORD=${DB_DEV_POSTGRES_PASSWORD}
- POSTGRES_DB=${DB_DEV_POSTGRES_DB_NAME}
db-it:
container_name: peak-it-2020-db-it
image: postgres:12-alpine
healthcheck:
test: >
pg_isready \
--host=localhost \
--port=5432 \
--dbname={DB_IT_POSTGRES_DB_NAME} \
--username=${DB_IT_POSTGRES_USER}
interval: "${DB_HEALTHCHECK_INTERVAL}"
timeout: "${DB_HEALTHCHECK_TIMEOUT}"
retries: ${DB_HEALTHCHECK_RETRIES}
start_period: "${DB_HEALTHCHECK_START_PERIOD}"
restart: unless-stopped
volumes:
- peak-it-2020-db-it_data:/var/lib/postgresql/data
ports:
- "5433:5432/tcp"
networks:
- local_postgresql
environment:
- POSTGRES_USER=${DB_IT_POSTGRES_USER}
- POSTGRES_PASSWORD=${DB_IT_POSTGRES_PASSWORD}
- POSTGRES_DB=${DB_IT_POSTGRES_DB_NAME}
db-admin:
container_name: peak-it-2020-db-admin
image: dpage/pgadmin4:4.27
healthcheck:
test: wget --quiet --spider http://localhost:80/misc/ping || exit 1
interval: "${DB_ADMIN_HEALTHCHECK_INTERVAL}"
timeout: "${DB_ADMIN_HEALTHCHECK_TIMEOUT}"
retries: ${DB_ADMIN_HEALTHCHECK_RETRIES}
start_period: "${DB_ADMIN_HEALTHCHECK_START_PERIOD}"
restart: unless-stopped
volumes:
- peak-it-2020-db-admin_data:/var/lib/pgadmin
ports:
- "8080:80/tcp"
networks:
- local_postgresql
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
depends_on:
- db-dev
- db-it
volumes:
peak-it-2020-db-dev_data:
external: true
peak-it-2020-db-it_data:
external: true
peak-it-2020-db-admin_data:
external: true
networks:
local_postgresql: