-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·74 lines (69 loc) · 1.89 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
version: "3"
services:
backend:
build:
context: .
image: sensorgnome-server-backend-image
container_name: sensorgnome-server-backend
hostname: sensorgnome-server
restart: on-failure
ports:
- "8080:8080"
volumes:
- .:/sensorgnome-server-software
command: >
sh -c "wait-for db:5432 && wait-for rabbit:5672 &&
python manage.py migrate &&
# DJANGO_SUPERUSER_PASSWORD=admin python manage.py createsuperuser --noinput --username admin --email [email protected] &&
python manage.py runserver 0.0.0.0:8080"
stdin_open: true
tty: true
depends_on:
- db
- rabbit
networks:
- shared_network
rabbit:
image: rabbitmq:3-management
container_name: sensorgnome-rabbit
hostname: sensorgnome-rabbit
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=admin
- RABBITMQ_DEFAULT_VHOST=/
ports:
- "5682:5672"
- "15682:15672"
networks:
- shared_network
worker:
image: sensorgnome-server-backend-image
container_name: worker
restart: on-failure
volumes:
- .:/sensorgnome-server-software
command: >
sh -c "wait-for backend:8080 &&
watchmedo auto-restart -p 'tasks.py' -i '*.pyc' -- celery worker -B -l info -A sensorgnome_server.celery:app -s /tmp/celerybeat-schedule"
depends_on:
- backend
- rabbit
- db
networks:
- shared_network
db:
#image: postgres:10-alpine
image: postgis/postgis
container_name: sensorgnome-db
hostname: sensorgnome-db
environment:
- POSTGRES_DB=sensorgnome-server
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "54320:5432"
networks:
- shared_network
networks:
shared_network:
driver: bridge