-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
98 lines (91 loc) · 2.2 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
89
90
91
92
93
94
95
96
97
98
version: '3.8'
volumes:
postgres-data:
networks:
watchmap:
driver: bridge
services:
monitor:
container_name: watchmap-monitor
build:
context: ./monitor
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
networks:
- watchmap
ports:
- "3000:3000"
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
PROJECT_HOST: http://localhost:3000
depends_on:
- db
db:
container_name: watchmap-db
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- watchmap
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
express-1:
container_name: watchmap-express-1
build:
context: ./servers/express-1
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
networks:
- watchmap
ports:
- "3001:3001"
depends_on:
- monitor
environment:
WATCHMAP_SERVER_REGISTER_URL: http://monitor:3000/api/register
WATCHMAP_SERVER_REQUEST_MONITOR_URL: http://monitor:3000/api/request-monitor
WATCHMAP_SERVICE_NAME: Express-1
PORT: 3001
express-2:
container_name: watchmap-express-2
build:
context: ./servers/express-2
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
networks:
- watchmap
ports:
- "3002:3002"
depends_on:
- monitor
environment:
WATCHMAP_SERVER_REGISTER_URL: http://monitor:3000/api/register
WATCHMAP_SERVER_REQUEST_MONITOR_URL: http://monitor:3000/api/request-monitor
WATCHMAP_SERVICE_NAME: Express-2
PORT: 3002
django-1:
container_name: watchmap-django-1
build:
context: ./servers/django_1
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
networks:
- watchmap
ports:
- "8000:8000"
depends_on:
- monitor
environment:
WATCHMAP_SERVER_REGISTER_URL: http://monitor:3000/api/register
WATCHMAP_SERVER_REQUEST_MONITOR_URL: http://monitor:3000/api/request-monitor
WATCHMAP_SERVICE_NAME: Django-1
PORT: 8000