-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose-host.yaml
135 lines (127 loc) · 3.8 KB
/
docker-compose-host.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
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:
- "8080:8080"
network_mode: host
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"
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=92
- NODE_ENV=development_docker
volumes:
- ./engine:/data/engine/
- ./core:/data/core/
- ./config.local.json:/data/engine/config.json
network_mode: host
labels:
- "traefik.enable=true"
- "traefik.http.routers.engine.rule=Host(`localhost`)" # Utiliser localhost comme hôte
- "traefik.http.services.engine.loadbalancer.server.port=92"
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=91
- NODE_ENV=development_docker
volumes:
- ./config.local.json:/data/engine/config.json
network_mode: host
labels:
- "traefik.enable=true"
- "traefik.http.routers.engineV1.rule=Host(`localhost`)" # Utiliser localhost comme hôte
- "traefik.http.services.engineV1.loadbalancer.server.port=91"
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
network_mode: host
ports:
- "80:80"
expose:
- "80"
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
network_mode: host
mongodb:
image: mongo:4.0.6
network_mode: host
ports:
- "27017:27017"
expose:
- "27017"
volumes:
- data:/data/db
command: --smallfiles
volumes:
data:
networks:
bus:
name: bus_network
# external: true