-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (45 loc) · 1017 Bytes
/
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
version: '3.8'
services:
web:
build: .
command: gunicorn sw_project.wsgi:application --bind 0.0.0.0:8000 --log-level debug
volumes:
- static_volume:/home/app/web/staticfiles
- tmp_volume:/home/app/web/tmp
expose:
- 8000
env_file:
- ./.env_docker
depends_on:
- postgres
- redis
restart: unless-stopped
postgres:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data/
- postgres_dumps:/postgres_dumps
environment:
- POSTGRES_USER=django_app_pg_user
- POSTGRES_PASSWORD=django_app_pg_password
- POSTGRES_DB=django_app_pg_dbname
restart: unless-stopped
redis:
image: redis:latest
restart: unless-stopped
ports:
- "6379:6379"
nginx:
build: ./nginx
volumes:
- static_volume:/home/app/web/staticfiles
ports:
- 80:80
depends_on:
- web
restart: unless-stopped
volumes:
postgres_data:
postgres_dumps:
static_volume:
tmp_volume: