-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (95 loc) · 2.03 KB
/
docker-compose.yml
File metadata and controls
101 lines (95 loc) · 2.03 KB
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
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: event_api
ports:
- "8000:8000"
environment:
MYSQL_HOST: mysql
MONGO_HOST: mongo
GRPC_HOST: grpc
GRPC_PORT: 50051
MYSQL_USER: root
MYSQL_PASSWORD: password
MYSQL_DB: event_manager
MONGO_URL: mongodb://mongo:27017/
depends_on:
mysql:
condition: service_healthy
mongo:
condition: service_healthy
grpc:
condition: service_started
networks:
- appnet
mongo:
image: mongo:6
container_name: mongo_db
ports:
- "27018:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
networks:
- appnet
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.runCommand({ping: 1})"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
mysql:
image: mysql:8
container_name: mysql_db
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: event_manager
ports:
- "3307:3306"
networks:
- appnet
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "--password=password"]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
client_service:
build:
context: ./client_service
dockerfile: Dockerfile
container_name: client_api
ports:
- "8001:8001"
depends_on:
mysql:
condition: service_healthy
mongo:
condition: service_healthy
environment:
MONGO_HOST: mongo
MYSQL_HOST: mysql
MYSQL_USER: root
MYSQL_PASSWORD: password
MYSQL_DB: event_manager
networks:
- appnet
grpc:
build: ./app
container_name: grpc_server
ports:
- "50051:50051"
networks:
- appnet
frontend:
build: ./frontend
ports:
- "5173:5173"
stdin_open: true
tty: true
depends_on:
- api
networks:
appnet: