-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-raspberrypi.yml
104 lines (96 loc) · 2.12 KB
/
docker-compose-raspberrypi.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '2'
services:
# PostgreSQL database
postgres:
build:
context: ./docker/postgres
dockerfile: Dockerfile-raspberrypi
environment:
- POSTGRES_DB=mtg
volumes:
- ./volumes/postgres/data:/var/lib/postgresql/data
- ./volumes/postgres/backup:/backups
ports:
- "5432:5432"
# Redis
redis:
image: mangoraft/redis-arm
hostname: redis
# RabbitMQ
rabbit:
hostname: rabbit
image: santoslab/arm-rabbitmq:management
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "5672:5672" # we forward this port because it's useful for debugging
- "15672:15672" # here, we can access rabbitmq management plugin
# Django web server
web:
build:
context: ./docker
dockerfile: Dockerfile-raspberrypi
hostname: web
command: bash -c "sh /bin/run_web_dev.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
- rabbit
- redis
volumes:
- ./mtg:/app
# Celery worker
worker:
build:
context: ./docker
dockerfile: Dockerfile-raspberrypi
command: bash -c "sh /bin/run_celery.sh"
depends_on:
- postgres
- rabbit
- redis
volumes:
- ./mtg:/app
# Celery beat
beat:
build:
context: ./docker
dockerfile: Dockerfile-raspberrypi
command: bash -c "sh /bin/run_beat.sh"
depends_on:
- postgres
- rabbit
- redis
volumes:
- ./mtg:/app
# Celery monitoring
monitoring:
build:
context: ./docker
dockerfile: Dockerfile-raspberrypi
command: bash -c "sh /bin/run_monitoring.sh"
depends_on:
- postgres
- rabbit
- redis
ports:
- "5555:5555"
- "5556:5556"
volumes:
- ./mtg:/app
# Node container
front:
image: node
command: bash -c "cd data && npm run dev"
depends_on:
- rabbit
ports:
- "8080:8080"
volumes:
- ./front:/data