forked from ADACS-Australia/covid19
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
61 lines (61 loc) · 1.52 KB
/
docker-compose.yaml
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
version: '3'
services:
inspec:
build:
context: ./covid19/
dockerfile: docker/inspec.Dockerfile
image: covid/inspec:4.18
command: >
bash -c "inspec supermarket exec dev-sec/linux-baseline --reporter=html:/root/reports/sample.html"
stdin_open: true
tty: true
volumes:
- ./inspec_reports:/root/reports
environment:
- SERVICE_DB=mysql
- SERVICE_WEB=web
mysql:
image: mysql:5.7.20
container_name: mysql_covid19
environment:
MYSQL_ROOT_PASSWORD: mypassword
MYSQL_DATABASE: covid
MYSQL_USER: covid
MYSQL_PASSWORD: covid19
volumes:
- mysql-persistent-storage:/var/lib/mysql
ports:
# this is a temporary solution to facilitate interacting with the db from the host
- "3307:3306"
web:
build:
context: ./covid19/
dockerfile: docker/web.Dockerfile
container_name: portal_covid19
image: dg_portal:0.1
depends_on:
- mysql
volumes:
- ./covid19/:/app/
- static:/app/covid19/static
tty: true
command: >
ash -c "python manage.py makemigrations
&& python manage.py migrate
&& python manage.py collectstatic --noinput
&& gunicorn --bind=0.0.0.0:8000 covid19.wsgi:application > /app/log.txt"
nginx:
build:
context: ./covid19/
dockerfile: docker/nginx.Dockerfile
ports:
- "80:80"
container_name: ng_covid19
image: ng_covid:0.1
depends_on:
- web
volumes:
- static:/static/
volumes:
mysql-persistent-storage:
static: