-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathdocker-compose.yml
37 lines (35 loc) · 1.09 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
version: '3.8'
services:
nginx:
image: nginx
container_name: petereport_nginx
volumes:
- ./nginx:/opt/petereport/nginx
- ./nginx/petereport.conf:/etc/nginx/conf.d/petereport.conf
- ./app/petereport/static:/opt/petereport/app/petereport/static
- ./app/media:/opt/petereport/app/media
ports:
- 80:80
- 443:443
depends_on:
- petereport
petereport:
build:
context: .
dockerfile: ./Dockerfile
image: petereport_django
container_name: petereport_django
command: bash -c "
sleep 1 &&
pipenv install --deploy --ignore-pipfile --python 3.9 &&
pip freeze &&
pipenv run ./app/manage.py makemigrations &&
pipenv run ./app/manage.py migrate &&
pipenv run ./app/manage.py loaddata ./app/config/cwe-list.json &&
pipenv run ./app/manage.py loaddata ./app/config/owasp-list.json &&
pipenv run gunicorn --chdir ./app petereport.wsgi:application --timeout 120 --graceful-timeout 60 --bind 0.0.0.0:8000"
volumes:
- .:/opt/petereport
expose:
- 8000
restart: unless-stopped