-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
104 lines (96 loc) · 2.26 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
100
101
102
103
104
version: "3.8"
services:
mysqldb:
hostname: mysqldb-regions
container_name: mysqldb-regions
image: mysql:8.0
restart: always
ports:
- "3307:3306"
logging:
#limit logs to 200MB (4rotations of 50M each)
driver: "json-file"
options:
max-size: "50m"
max-file: "4"
environment:
MYSQL_USER: mysql
MYSQL_PASSWORD: password
MYSQL_DATABASE: regions
MYSQL_ROOT_PASSWORD: password
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
server:
hostname: server-regions
container_name: server-regions
image: myapp
environment:
- REACT_APP_TOKEN=${REACT_APP_TOKEN}
restart: always
logging:
#limit logs to 200MB (4rotations of 50M each)
driver: "json-file"
options:
max-size: "50m"
max-file: "4"
build:
context: ../Regions-Service/
dockerfile: Dockerfile
ports:
- "8080:8080"
- "8090:8090"
env_file:
- frontend/.env
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8090/actuator/health" ]
interval: 10s
timeout: 2s
retries: 10
start_period: 40s
depends_on:
mysqldb:
condition: service_healthy
plates:
hostname: plates
container_name: plates
build:
context: ../Regions-Service/plates
dockerfile: Dockerfile
restart: always
logging:
#limit logs to 200MB (4rotations of 50M each)
driver: "json-file"
options:
max-size: "50m"
max-file: "4"
ports:
- "8000:8000"
depends_on:
server:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 10s
timeout: 2s
retries: 10
start_period: 40s
nginx:
hostname: nginx-regions
container_name: nginx-regions
image: nginx:alpine
restart: always
ports:
- "80:80"
volumes:
- ./nginx_config/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
server:
condition: service_healthy
logging:
# limit logs to 200MB (4 rotations of 50M each)
driver: "json-file"
options:
max-size: "50m"
max-file: "4"