forked from iavofficial/erzmobil-routing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
94 lines (87 loc) · 2.2 KB
/
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
86
87
88
89
90
91
92
93
94
version: "3"
services:
# PostgreSQL with PostGIS
db:
image: postgis/postgis:13-master
restart: always
env_file:
- ./.env
ports:
- "5432:5432"
# Backend app
web:
build: .
restart: on-failure
environment:
- POSTGRES_HOST=db
- RABBITMQ_HOST=rabbitmq
env_file:
- ./.env
volumes:
- ./maps:/maps
ports:
- "8080:8080"
depends_on:
- db
- rabbitmq
# Tester container for running integration tests locally
tester:
build: .
environment:
- BUSNOW_ENVIRONMENT=DEBUGGING
- POSTGRES_HOST=db
- RABBITMQ_HOST=rabbitmq
- OSRM_API_URI=NONE # empty since tests also use maps load from file
- REST_THROTTLINGRATE_ANON=300
- REST_THROTTLINGRATE_USER=100
- ROUTING_FREEZE_TIME_DELTA=15
env_file:
- ./.env
entrypoint: python manage.py test -v 2 --keepdb --noinput # deactivate entrypoint for local debugging of container
#entrypoint: python manage.py test Routing_Api.Mobis.tests.Services.test_order_ordersWithMapsAndOSRMinSameRoute -v 2 --keepdb --noinput # run specific test
volumes:
- ./maps:/maps
ports:
- "8000:8000"
depends_on:
- db
- rabbitmq
# RabbitMQ
rabbitmq:
image: "rabbitmq:3-management"
ports:
- "15672:15672"
- "5672:5672"
# Celery Worker (responsible for executing the predefined tasks)
celery-worker:
build:
context: .
dockerfile: Celeryworker.dockerfile
restart: on-failure
environment:
- POSTGRES_HOST=db
- RABBITMQ_HOST=rabbitmq
- ROUTING_FREEZE_TIME_DELTA=15
env_file:
- ./.env
depends_on:
- db
# Celery Beat (a scheduler that sends predefined tasks to celery worker)
celery-beat:
build:
context: .
dockerfile: Celerybeat.dockerfile
restart: on-failure
command: [ "--pidfile=" ]
environment:
- POSTGRES_HOST=db
- RABBITMQ_HOST=rabbitmq
- ROUTING_FREEZE_TIME_DELTA=15
env_file:
- ./.env
depends_on:
- db
- rabbitmq
networks:
busnow-directus_directus:
external: true