-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (63 loc) · 1.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (63 loc) · 1.38 KB
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
62
63
64
65
66
67
68
69
70
version: '3'
services:
web:
build: .
command: bash -c "python manage.py makemigrations
&& python manage.py migrate &&
python manage.py loaddata db.json &&
python manage.py test &&
python manage.py runserver 0.0.0.0:8000"
container_name: order_pickup
volumes:
- .:/order_pickup
ports:
- "8000:8000"
environment:
- DB_HOST=db
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASS=postgres
depends_on:
- db
- redis
db:
image: postgres:13
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
redis:
image: redis:alpine
ports:
- "6379:6379"
celery:
restart: always
build: .
command: celery -A orderpickup worker -l info
volumes:
- .:/order_pickup
environment:
- DB_HOST=db
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASS=postgres
depends_on:
- db
- redis
- web
celery_beat:
build: .
command: celery -A orderpickup beat -s /tmp/celerybeat-schedule
volumes:
- .:/order_pickup
environment:
- DB_HOST=db
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASS=postgres
depends_on:
- db
- redis
- web
volumes:
postgres_data: