-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (60 loc) · 1.42 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
version: '3.8'
services:
webserver:
container_name: webserver-globalmart
build: ./
command: sh -c "python manage.py runserver 0.0.0.0:8000"
volumes:
- ./:/usr/src/app/
ports:
- 8000:8000
depends_on:
- db
db:
container_name: db-master-globalmart
image: postgres:14.7-alpine
volumes:
- pgdata:/var/lib/postgresql/data/
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=globalmart
db-replica1:
container_name: db-replica1-globalmart
image: postgres:14.7-alpine
volumes:
- pgdata_replica1:/var/lib/postgresql/data/
ports:
- 5433:5433
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=globalmart
- PGPORT=5433
db-replica2:
container_name: db-replica2-globalmart
image: postgres:14.7-alpine
volumes:
- pgdata_replica2:/var/lib/postgresql/data/
ports:
- 5434:5434
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=globalmart
- PGPORT=5434
pgadmin:
container_name: pgadmin4-globalmart
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root123
ports:
- "5051:80"
volumes:
pgdata:
pgdata_replica1:
pgdata_replica2: