-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (48 loc) · 1.07 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
version: "3.9"
services:
web:
build:
context: .
dockerfile: deploy/web/Dockerfile.win
restart: unless-stopped
env_file:
- .env
expose:
- 8000
volumes:
- ./app/:/app/app
- static_volume:/app/app/staticfiles
- media_volume:/app/app/mediafiles
depends_on:
- redis
- db
command: poetry run gunicorn --chdir /app/app api.asgi:application --bind 0.0.0.0:8000 -w 4 -k uvicorn.workers.UvicornWorker
db:
image: postgres:16.0
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=hello_django
- POSTGRES_PASSWORD=hello_django
- POSTGRES_DB=hello_django_dev
redis:
image: redis:7.2.1
restart: always
ports:
- 6379:6379
nginx:
build:
context: ./deploy/nginx
restart: always
ports:
- ${NGINX_PORT}:80
volumes:
- static_volume:/app/app/staticfiles
- media_volume:/app/app/mediafiles
depends_on:
- web
volumes:
postgres_data:
static_volume:
media_volume: