-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (42 loc) · 918 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (42 loc) · 918 Bytes
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
version: '2'
services:
db:
image: linguofeng/rpi-postgres
ports:
- "5432:5432"
redis:
image: hypriot/rpi-redis
rabbitmq:
image: wsrak/rpi-rabbitmq:v3.5.7
ports:
- "5672:5672"
- "15672:15672"
web:
build: .
depends_on:
- db
command: bash -c "sleep 5;python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
devices:
- "/dev/spidev0.0:/dev/spidev0.0"
ports:
- "8000:8000"
links:
- db
- worker
worker:
build: .
environment:
- C_FORCE_ROOT=true
- DATABASE_HOST=postgresql
- BROKER_URL=amqp://guest:guest@rabbitmq//
command: bash -c "while ! nc -z rabbitmq 5672; do sleep 1; done ; celery -A lamps worker -E -l info --concurrency=2"
volumes:
- .:/code
devices:
- "/dev/spidev0.0:/dev/spidev0.0"
links:
- db:db
- rabbitmq
- redis