forked from cleanappio/cleanapp_back_end_v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.report-auth.yml
More file actions
76 lines (71 loc) · 1.61 KB
/
docker-compose.report-auth.yml
File metadata and controls
76 lines (71 loc) · 1.61 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
version: '3.8'
services:
auth-service:
build: ./auth-service
ports:
- "8080:8080"
environment:
- DB_HOST=db
- DB_PORT=3306
- DB_USER=root
- DB_PASSWORD=password
- PORT=8080
- REPORT_AUTH_SERVICE_URL=http://report-auth-service:8081
depends_on:
db:
condition: service_healthy
networks:
- cleanapp-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
report-auth-service:
build: ./report-auth-service
ports:
- "8081:8081"
environment:
- DB_HOST=db
- DB_PORT=3306
- DB_USER=root
- DB_PASSWORD=password
- PORT=8081
- AUTH_SERVICE_URL=http://auth-service:8080
depends_on:
auth-service:
condition: service_healthy
db:
condition: service_healthy
networks:
- cleanapp-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: cleanapp
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- cleanapp-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
mysql_data:
networks:
cleanapp-network:
driver: bridge