-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (63 loc) · 1.31 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
version: "3.9"
services:
app:
build:
context: .
ports:
- "8000:8000"
volumes:
- .:/app
command: >
sh -c " python manage.py runserver 0.0.0.0:8000"
environment:
- DB1_HOST=db1
- DB2_HOST=db2
- DB3_HOST=db3
- DB_USER=habib
- DB_PASSWORD=habib
- DB_NAME=habib
depends_on:
- db1
- db2
- db3
db1:
image: postgres:13-alpine
volumes:
- dev-db-data1:/var/lib/postgresql/data
environment:
- POSTGRES_USER=habib
- POSTGRES_PASSWORD=habib
- POSTGRES_DB=habib
ports:
- "5432:5432"
db2:
image: postgres:13-alpine
volumes:
- dev-db-data2:/var/lib/postgresql/data
environment:
- POSTGRES_USER=habib
- POSTGRES_PASSWORD=habib
- POSTGRES_DB=habib_2
ports:
- "5433:5432"
db3:
image: postgres:13-alpine
volumes:
- dev-db-data3:/var/lib/postgresql/data
environment:
- POSTGRES_USER=habib
- POSTGRES_PASSWORD=habib
- POSTGRES_DB=habib_3
ports:
- "5434:5432"
pgadmin:
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=ahmed7abib007@gmail.com
- PGADMIN_DEFAULT_PASSWORD=habib
ports:
- "5050:80"
volumes:
dev-db-data1:
dev-db-data2:
dev-db-data3: