-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
58 lines (49 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
version: "3.9"
services:
redis:
image: "redis:latest"
ports:
- "6379:6379"
db:
image: postgres:latest
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "admin"
POSTGRES_DB: "root"
volumes:
- pgdata:/var/lib/postgresql/data/
web:
build: .
ports:
- "8000:8000"
links:
- db:db
- redis:redis
volumes:
- type: bind
source: .
target: /app
env_file: .env
command: bash -c "python3 manage.py makemigrations &&
python3 manage.py migrate &&
python3 manage.py collectstatic --no-input &&
python3 manage.py runserver 0.0.0.0:8000"
depends_on:
- db
worker:
build:
context: .
dockerfile: Dockerfile
image: madefire/chordtest
command: bash -c "celery -A todo worker -l INFO"
environment:
- BROKER_URL=redis://redis:6379/0
- RESULT_BACKEND=redis://redis:6379/0
- C_FORCE_ROOT=true
volumes:
- ./:/app/
depends_on:
- redis
volumes:
media:
pgdata: