-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (46 loc) · 1022 Bytes
/
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
version: '3'
volumes:
db-data:
services:
rabbitmq:
image: "rabbitmq:3-management"
environment:
RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLMNEQG"
RABBITMQ_DEFAULT_USER: "rabbitmq_user"
RABBITMQ_DEFAULT_PASS: "rabbitmq_password"
RABBITMQ_DEFAULT_VHOST: "/"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_running"]
interval: 10s
timeout: 5s
retries: 3
ports:
- "15672:15672"
- "5672:5672"
consumer:
user: node
build: .
env_file:
- .env
volumes:
- ./:/home/node/app
command: "npm run start:dev:consumer"
depends_on:
rabbitmq:
condition: service_healthy
deploy:
mode: replicated
replicas: 2
api:
user: node
build: .
env_file:
- .env
volumes:
- ./:/home/node/app
ports:
- "3001:3001"
entrypoint: "sh ./.docker/entrypoint.sh"
depends_on:
rabbitmq:
condition: service_healthy