-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
60 lines (55 loc) · 1.04 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
54
55
56
57
58
59
60
version: "3.9"
services:
# Postgress
db:
image: postgres:13
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
ports:
- "5432:5432"
# Redis
redis:
image: redis:7
# Django Application
web:
build: .
restart: always
command: gunicorn shopapi.wsgi:application --bind 0.0.0.0:8000
env_file:
- ./.env
ports:
- 8000:8000
volumes:
- static:/code/static
- media:/code/media
depends_on:
- redis
- db
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
# Celery
celery:
build: .
restart: always
command: celery -A shopapi worker --loglevel=info
volumes:
- .:/code
env_file:
- ./.env
depends_on:
- db
- redis
- web
volumes:
postgres_data:
static:
media: