-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
41 lines (40 loc) · 1.02 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
version: '2'
services:
postgres:
image: postgres:12.0
web:
restart: always
environment:
- DJANGO_SECRET_KEY=local
- REDIS_URL=redis://redis:6379/
image: web
build: ./
command: >
bash -c "npm install && npm run build &&
pipenv run python wait_for_postgres.py &&
pipenv run ./manage.py migrate &&
pipenv run ./manage.py runserver 0.0.0.0:8000"
volumes:
- ./:/code
ports:
- "8000:8000"
depends_on:
- postgres
redis:
image: "redis:alpine"
worker:
restart: always
image: web
environment:
- DJANGO_SECRET_KEY=local
- REDIS_URL=redis://redis:6379/
depends_on:
- postgres
- redis
build: ./
volumes:
- ./:/code
command: >
bash -c "pipenv run python wait_for_postgres.py &&
pipenv run ./manage.py migrate &&
pipenv run celery -A hsv_dot_beer worker -l info --beat --scheduler django_celery_beat.schedulers:DatabaseScheduler -O fair"