-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (103 loc) · 2.47 KB
/
docker-compose.yml
File metadata and controls
103 lines (103 loc) · 2.47 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
102
103
version: "3.3"
volumes:
# ignore all css from the docker container and do not mount to my local dir
# This is because the CSS files shouldn't be modified. Only the sass files
# So no need to store them locally.
compiled_css:
services:
nginx:
depends_on:
- web
restart: always
build:
context: ./src/Codenalysis/nginx
ports:
- 80:80
healthcheck:
test: ["CMD", "service", "nginx", "status", "|", "grep", "\\[ ok \\] nginx is running"]
interval: 1m30s
timeout: 10s
retries: 3
db:
restart: always
build:
context: src/Codenalysis/db
environment:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
interval: 1m30s
timeout: 10s
retries: 3
web:
restart: always
depends_on:
- api
- auth
build:
context: src/Codenalysis/web/
dockerfile: Dockerfile
environment:
NODE_ENV: development
DANGEROUSLY_DISABLE_HOST_CHECK: 'true'
HOST: 0.0.0.0
PORT: '3000'
healthcheck:
test: ["CMD", "ps", "aux", "|", "grep", "start.js"]
interval: 1m30s
timeout: 10s
retries: 3
volumes:
- ./src/Codenalysis/web/src:/codenalysis/src
- ./src/Codenalysis/web/public:/codenalysis/public
- compiled_css:/codenalysis/src/assets/css
api:
depends_on:
- db
- auth
restart: always
build:
context: src/Codenalysis/api
dockerfile: ops/Dockerfile
environment:
FLASK_ENV: development
env_file:
- secrets.env
healthcheck:
test: ["CMD", "!", "curl", "http://localhost/api/v1/healthcheck", "|", "grep", "NOT OK"]
interval: 1m30s
timeout: 10s
retries: 3
volumes:
- ./src/Codenalysis/api:/codenalysis
tty: true
stdin_open: true
auth:
depends_on:
- redis
- db
restart: always
build:
context: src/Codenalysis/auth
dockerfile: ops/Dockerfile
environment:
FLASK_ENV: development
env_file:
- secrets.env
healthcheck:
test: ["CMD", "curl", "http://localhost/api/v1/auth/healthcheck", "|", "grep", "OK"]
interval: 1m30s
timeout: 10s
retries: 3
volumes:
- ./src/Codenalysis/auth:/auth
tty: true
stdin_open: true
redis:
restart: always
image: redis:6.2.1
# build:
# context: src/Codenalysis/api
# dockerfile: opts/Dockerfile