-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
85 lines (77 loc) · 1.69 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '2'
services:
# PostgreSQL database
postgres:
build: ./compose/postgres
environment:
- POSTGRES_USER=mtg
- POSTGRES_PASSWORD=mtgmtg
- POSTGRES_DB=mtg
volumes:
- ./volumes/postgres/data:/var/lib/postgresql/data
- ./volumes/postgres/backup:/backups
# Redis
redis:
image: redis
hostname: redis
# RabbitMQ
rabbit:
hostname: rabbit
- ./front:/data
image: rabbitmq:3-management
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "127.0.0.1:5672:5672" # we forward this port because it's useful for debugging
- "127.0.0.1:15672:15672" # here, we can access rabbitmq management plugin
# Django web server
web:
build:
context: .
dockerfile: Dockerfile
hostname: web
command: ./run_web.sh
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "8000:8000"
# set up links so that web knows about postgres, rabbit and redis
depends_on:
- postgres
# Celery worker
worker:
build:
context: .
dockerfile: Dockerfile
command: ./run_celery.sh
depends_on:
- rabbit
# Celery beat
beat:
build:
context: .
dockerfile: Dockerfile
command: ./run_beat.sh
depends_on:
- rabbit
# Celery monitoring
monitoring:
build:
context: .
dockerfile: Dockerfile
command: ./run_monitoring.sh
depends_on:
- rabbit
ports:
- "5555:5555"
- "5556:5556"
# Node container
front:
image: node
command: bash -c "cd data && npm run dev"
depends_on:
- rabbit
ports:
- "8080:8080"