-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (64 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
65 lines (64 loc) · 1.42 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
services:
db:
image: postgres
# persist data beyond lifetime of container
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=scope
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
interval: 2s
retries: 10
redis:
image: redis
# persistent storage
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: bash -c 'exec 6<>/dev/tcp/redis/6379'
interval: 2s
retries: 10
web:
build:
context: .
dockerfile: Dockerfile.dev
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
environment:
PYTHONUNBUFFERED: '1'
PYTHONDONTWRITEBYTECODE: '1'
env_file:
- ./.env
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
celery:
build:
context: .
dockerfile: Dockerfile.dev
command: celery -A scope worker -l INFO --beat --pool=solo
volumes:
- .:/code
environment:
PYTHONUNBUFFERED: '1'
PYTHONDONTWRITEBYTECODE: '1'
env_file:
- ./.env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
postgres_data:
redis_data: