-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
96 lines (88 loc) · 2.12 KB
/
docker-compose.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
version: "3.9"
services:
postgres:
image: postgres:12.13-alpine
volumes:
- postgres_volume:/var/lib/postgresql
ports:
- "5432:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
rabbitmq:
image: rabbitmq:3.10-management
restart: unless-stopped
ports:
- "5672:5672"
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=${AMQP_USER}
- RABBITMQ_DEFAULT_PASS=${AMQP_PASS}
mongo:
image: mongo:6.0-focal
restart: unless-stopped
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASS}
- MONGO_INITDB_DATABASE=${MONGO_DBNAME}
ms_a:
build: ./ms_a
image: ms_a:dev
restart: unless-stopped
# volumes:
# - ./ms_a:/opt/project
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_started
rabbitmq:
condition: service_started
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=${POSTGRES_HOST}
- AMQP_HOST=${AMQP_HOST}
- AMQP_VHOST=${AMQP_VHOST}
- AMQP_USER=${AMQP_USER}
- AMQP_PASS=${AMQP_PASS}
ms_b:
build: ./ms_b
image: ms_b:dev
# volumes:
# - ./ms_b:/opt/project
ports:
- "8001:8000"
depends_on:
- rabbitmq
environment:
- AMQP_HOST=${AMQP_HOST}
- AMQP_VHOST=${AMQP_VHOST}
- AMQP_USER=${AMQP_USER}
- AMQP_PASS=${AMQP_PASS}
ms_c:
build: ./ms_c
image: ms_c:dev
restart: unless-stopped
# volumes:
# - ./ms_c:/opt/project
ports:
- "3000:3000"
depends_on:
- mongo
- rabbitmq
environment:
- AMQP_HOST=${AMQP_HOST}
- AMQP_VHOST=${AMQP_VHOST}
- AMQP_USER=${AMQP_USER}
- AMQP_PASS=${AMQP_PASS}
- MONGO_HOST=${MONGO_HOST}
- MONGO_USER=${MONGO_USER}
- MONGO_PASS=${MONGO_PASS}
- MONGO_DBNAME=${MONGO_DBNAME}
volumes:
postgres_volume: {}