-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (45 loc) · 1.03 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
volumes:
data:
static:
media:
services:
django:
build:
context: .
dockerfile: Dockerfile
container_name: python-project-52
env_file:
- docker/env/.env
ports:
- 8000:8000
depends_on:
- database
command: sh -c "poetry run python manage.py collectstatic --no-input &&
poetry run python manage.py migrate &&
poetry run gunicorn --workers=4 --reload --max-requests=1000 task_manager.wsgi -b 0.0.0.0:8000"
nginx:
container_name: nginx
working_dir: /app
image: nginx:stable-alpine
restart: always
ports:
- "80:80"
volumes:
- static:/app/static
- media:/app/media
- ./docker/nginx/prod/:/etc/nginx/conf.d:ro
- ./docker/nginx/errors/:/usr/share/nginx/html
links:
- django
depends_on:
- django
database:
image: postgres
container_name: postgres
restart: always
ports:
- 5433:5432
env_file:
- docker/env/.env
volumes:
- data:/var/lib/postgresql/data/