-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
99 lines (90 loc) · 1.96 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
99
version: '3.4'
services:
nginx:
image: nginx:alpine
ports:
- 80:80
- 443:443
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- commentsapi
- postsapi
- authapi
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:15672" ]
interval: 30s
timeout: 10s
retries: 5
postsapi:
image: ${DOCKER_REGISTRY-}postsapi
build:
context: .
dockerfile: PostsAPI/Dockerfile
environment:
MONGO_URI: mongodb://mongo_db:27017
restart: on-failure
depends_on:
- mongo_db_auth
- rabbitmq
links:
- rabbitmq
commentsapi:
image: ${DOCKER_REGISTRY-}commentsapi
build:
context: .
dockerfile: CommentsAPI/Dockerfile
environment:
MONGO_URI: mongodb://mongo_db:27017
restart: on-failure
depends_on:
- mongo_db_comment
- rabbitmq
links:
- rabbitmq
authapi:
image: ${DOCKER_REGISTRY-}authapi
build:
context: .
dockerfile: AuthAPI/Dockerfile
environment:
MONGO_URI: mongodb://mongo_db:27017
depends_on:
- mongo_db_post
mongo_db_auth:
container_name: db_container_auth
image: mongo:latest
restart: always
ports:
- '27018:27017'
volumes:
- mongo_db_auth:/data/db
mongo_db_post:
container_name: db_container_post
image: mongo:latest
restart: always
ports:
- '27019:27017'
volumes:
- mongo_db_post:/data/db
mongo_db_comment:
container_name: db_container_comment
image: mongo:latest
restart: always
ports:
- '27020:27017'
volumes:
- mongo_db_comment:/data/db
volumes:
mongo_db_auth: {}
mongo_db_post: {}
mongo_db_comment: {}