-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
65 lines (61 loc) · 1.53 KB
/
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
volumes:
postgres_data:
name: postgres_data
#external: true
postgres_standby_data:
name: postgres_standby_data
#external: true
pgadmin_data:
name: pgadmin_data
external: true
# This will be used as the domainname, so let's keep it short.
networks:
datastore:
name: datastore
services:
primary:
container_name: dsprimary
image: postgres
build:
context: .
dockerfile: Dockerfile.postgres
ports:
# Allow access to this database from our LAN
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
env_file: .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks:
- datastore
standby:
container_name: dsstandby
image: postgres
volumes:
- postgres_standby_data:/var/lib/postgresql/data
env_file: .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
#ports:
# Normally we don't need any ports accessible outside our docker network
# - "5433:5432"
networks:
- datastore
pgadmin:
container_name: dspgadmin
image: dpage/pgadmin4:latest
ports:
- "8213:80"
volumes:
# Session data, user files, config files, config database go here.
- pgadmin_data:/var/lib/pgadmin
env_file: .env
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_USER}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
PGADMIN_DISABLE_POSTFIX: 1
networks:
- datastore