-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (55 loc) · 1.11 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
61
version: '3.9'
volumes:
postgres_volume:
static_volume:
media_volume:
services:
# Database Postgres
db:
image: postgres:latest
container_name: postgres
env_file:
- ./retail_order_api/.env
volumes:
- postgres_volume:/var/lib/postgresql/data/
ports:
- "5432:5432"
# Django App
web:
build: ./retail_order_api
container_name: retail_order_api
ports:
- "8000:8000"
env_file:
- ./retail_order_api/.env
volumes:
- static_volume:/usr/src/app/static
- media_volume:/usr/src/app/media
depends_on:
- db
command: sh /usr/src/app/entrypoint.sh
# web-server
nginx:
build: ./nginx
container_name: nginx
restart: on-failure
ports:
- '1337:80'
volumes:
- static_volume:/static
- media_volume:/media
depends_on:
- web
# Redis
redis:
image: redis:latest
container_name: redis
ports:
- "6300:6379"
# Celery
celery:
build: ./retail_order_api
command: celery -A retail_order_api worker -l info
depends_on:
- redis
- db