forked from scoringengine/scoringengine
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
144 lines (142 loc) · 2.88 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
version: '3.7'
services:
redis:
image: "redis:latest"
healthcheck:
test: ["CMD", "redis-cli", "-h", "127.0.0.1", "ping"]
interval: 30s
timeout: 3s
retries: 10
restart: on-failure
volumes:
- redis:/data
networks:
- default
# ports:
# - 6379:6379
mysql:
image: mysql:5
environment:
- MYSQL_ROOT_PASSWORD=CHANGEME
- MYSQL_DATABASE=scoring_engine
- MYSQL_USER=se_user
- MYSQL_PASSWORD=CHANGEME
restart: on-failure
volumes:
- mysql:/var/lib/mysql
networks:
- default
# ports:
# - 3306:3306
nginx:
image: scoringengine/nginx
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
cache_from:
- scoringengine/nginx
- nginx:latest
depends_on:
- web
ports:
- 80:80
- 443:443
healthcheck:
test: ["CMD", "curl", "-f", "localhost"]
interval: 30s
timeout: 3s
retries: 10
restart: on-failure
networks:
- default
base:
image: scoringengine/base
build:
context: .
dockerfile: ./docker/base/Dockerfile
cache_from:
- scoringengine/base
- base:latest
bootstrap:
image: scoringengine/bootstrap
build:
context: .
dockerfile: ./docker/bootstrap/Dockerfile
cache_from:
- scoringengine/bootstrap
- bootstrap:latest
depends_on:
- base
- mysql
healthcheck:
test: ["CMD", "exit", "1"]
restart: on-failure
networks:
- default
environment:
- SCORINGENGINE_EXAMPLE
- SCORINGENGINE_OVERWRITE_DB
- SCORINGENGINE_VERSION
engine:
image: scoringengine/engine
build:
context: .
dockerfile: ./docker/engine/Dockerfile
cache_from:
- scoringengine/engine
- engine:latest
depends_on:
- base
- redis
- bootstrap
restart: on-failure
networks:
- default
environment:
- SCORINGENGINE_EXAMPLE
- SCORINGENGINE_VERSION
worker:
image: scoringengine/worker
build:
context: .
dockerfile: ./docker/worker/Dockerfile
cache_from:
- scoringengine/worker
- worker:latest
depends_on:
- base
- redis
restart: on-failure
networks:
- default
environment:
- SCORINGENGINE_EXAMPLE
- SCORINGENGINE_VERSION
privileged: true
web:
image: scoringengine/web
build:
context: .
dockerfile: ./docker/web/Dockerfile
cache_from:
- scoringengine/web
- web:latest
depends_on:
- base
- mysql
healthcheck:
test: ["CMD", "curl", "-f", "localhost:5000"]
interval: 30s
timeout: 3s
retries: 10
restart: on-failure
networks:
- default
environment:
- SCORINGENGINE_VERSION
volumes:
redis:
mysql:
networks:
default: