-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (43 loc) · 957 Bytes
/
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
version: "3.9"
services:
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
web:
build: .
command: >
bash -c "python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:
- "8000:8000"
environment:
- POSTGRES_NAME=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
depends_on:
- db
rabbitmq:
image: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=$RABBIT_USER
- RABBITMQ_DEFAULT_PASS=$RABBIT_PASS
ports:
- "5672:5672"
- "15672:15672"
celery:
build: .
command: celery -A simple_push worker -l info
volumes:
- .:/code
depends_on:
- web
- rabbitmq
environment:
- DB_HOST=db