-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose-network.yaml
150 lines (142 loc) · 3.94 KB
/
docker-compose-network.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
version: '3.5'
services:
traefik:
image: traefik:v2.5
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:90" # Spécifier l'adresse d'entrée
ports:
- "90:90"
networks:
- bus
volumes:
- /var/run/docker.sock:/var/run/docker.sock
##Laisser le nom main pour la localisation des folder pour la resolution du path de config
timer:
build:
context: .
dockerfile: ./timer/Dockerfile-alpine
container_name: timer
image: semanticbus/timer
environment:
- APP_PORT=100
- NODE_ENV=development_docker
- CONFIG_URL=$CONFIG_URL
volumes:
- ./timer:/data/timer/
- ./core:/data/core/
- ./config.local.json:/data/timer/config.json
networks:
- bus
ports:
- "100:100"
expose:
- "100"
links:
- mongodb
- rabbitmq
depends_on:
- mongodb
- rabbitmq
command: ["/data/scripts/wait-for-it.sh", "rabbitmq:5672", "-t", "25", "--", "nodemon", "-L", "--watch", "/data/timer/*", "--watch", "/data/core/*", "--ignore", "configuration.js", "/data/timer/app.js"]
engine:
build:
context: .
dockerfile: ./engine/Dockerfile-alpine
container_name: engine
environment:
- APP_PORT=90
- NODE_ENV=development_docker
volumes:
- ./engine:/data/engine/
- ./core:/data/core/
- ./config.local.json:/data/engine/config.json
networks:
- bus
labels:
- "traefik.enable=true"
- "traefik.http.routers.engine.rule=Host(`engine`)" # Utiliser localhost comme hôte
- "traefik.http.services.engine.loadbalancer.server.port=90"
links:
- mongodb
- rabbitmq
depends_on:
- mongodb
- rabbitmq
command: bash -c "/data/scripts/wait-for-it.sh rabbitmq:5672 -t 60 -- nodemon --watch /data/engine --watch /data/core --ignore configuration.js --max-old-space-size=4096 /data/engine/app.js"
engineV1:
image: dataplayers/semantic-bus-engine:v1.0
container_name: engineV1
environment:
- APP_PORT=90
- NODE_ENV=development_docker
volumes:
- ./config.local.json:/data/engine/config.json
networks:
- bus
labels:
- "traefik.enable=true"
- "traefik.http.routers.engineV1.rule=Host(`engine`)" # Utiliser localhost comme hôte
- "traefik.http.services.engineV1.loadbalancer.server.port=90"
links:
- mongodb
- rabbitmq
depends_on:
- mongodb
- rabbitmq
command: bash -c "/data/scripts/wait-for-it.sh rabbitmq:5672 -t 60 -- nodemon --watch /data/engine --watch /data/core --ignore configuration.js --max-old-space-size=4096 /data/engine/app.js"
main:
build:
context: .
dockerfile: ./main/Dockerfile-alpine
container_name: main
image: semanticbus/main
environment:
- APP_PORT=80
- NODE_ENV=development_docker
- CONFIG_URL=$CONFIG_URL
volumes:
- ./main:/data/main/
- ./core:/data/core/
- ./config.local.json:/data/main/config.json
networks:
- bus
ports:
- "80:80"
expose:
- "80"
links:
- mongodb
- rabbitmq
depends_on:
- mongodb
- rabbitmq
command: ["/data/scripts/wait-for-it.sh", "rabbitmq:5672", "-t", "25", "--", "nodemon", "-L", "--watch", "/data/main/*", "--watch", "/data/core/*", "--ignore", "configuration.js", "--max-old-space-size=8192", "/data/main/app.js"]
rabbitmq:
image: semanticbus/rabbitmq-stomp
container_name: rabbitmq
ports:
- 5672:5672
- 15674:15674
- 15672:15672
networks:
- bus
mongodb:
image: mongo:4.0.6
networks:
- bus
ports:
- "27017:27017"
expose:
- "27017"
volumes:
- data:/data/db
command: --smallfiles
volumes:
data:
networks:
bus:
name: bus_network
# external: true