-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
56 lines (55 loc) · 1.28 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
version: '3'
services:
unidb:
image: postgres
hostname: unidb
container_name: unidb
# volumes:
# - ./pg-data:/var/lib/postgresql/data
uniredis:
image: redis
hostname: uniredis
container_name: uniredis
unirabbit:
container_name: unirabbit
hostname: unirabbit
image: rabbitmq:3.6.0
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
ports:
- "5672:5672" # we forward this port because it's useful for debugging
- "15672:15672" # here, we can access rabbitmq management plugin
unipython:
container_name: unipython
build: .
stdin_open: true
tty: true
volumes:
- .:/app
ports:
- "8000:8000"
depends_on:
- unirabbit
- uniredis
- unidb
command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
environment:
- PYTHON_ENV=docker
uniworker:
build:
context: .
dockerfile: Dockerfile
command: bash -c "sleep 10 && celery -A settings worker -l info -B"
environment:
- PYTHON_ENV=docker
volumes:
- .:/app
links:
- unidb
- unirabbit
- uniredis
depends_on:
- unidb
- unirabbit
- uniredis