-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.dev.yml
150 lines (137 loc) · 4.03 KB
/
docker-compose.dev.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# docker compose file for development useage
version: '3.8'
services:
frontend:
build:
context: ./
dockerfile: ./docker/nginx.Dockerfile
args:
#
- VITE_API_BASE_URL=localhost:8001
- VITE_API_SCHEMA=http
# Extend the existing postgis container with an accessible port for development purposes
postgis:
ports:
- 5555:5432
redis:
ports:
- 5556:6379
inspire-validator:
build:
context: ./docker/inspire-validator
ports:
- "5557:8080"
networks:
- mrmap-internal
extra_hosts:
- host.docker.internal:host-gateway
mapserver:
ports:
- "8090:80"
pre-commit-check:
build:
context: ./mrmap
dockerfile: ../docker/backend/alpine.Dockerfile
args:
MRMAP_PRODUCTION: 'False'
entrypoint: /opt/mrmap/.bash_scripts/wait_db.sh
command: /bin/sh -c "/opt/mrmap/.bash_scripts/pre_commit_check.sh"
hostname: "mrmap-test"
volumes:
- type: bind
source: ./backend
target: /opt/mrmap
networks:
- mrmap-internal
env_file:
- ./docker/backend/.mrmap.env
depends_on:
- postgis
- redis
behave:
build:
context: ./mrmap
dockerfile: ../docker/backend/alpine.Dockerfile
args:
MRMAP_PRODUCTION: 'False'
shm_size: '2gb' # Fix 'Failed to decode response from marionette' (https://stackoverflow.com/questions/49734915/)
tty: true # To support colorized log output of gherkin and other log information.
entrypoint: /opt/mrmap/.bash_scripts/wait_db.sh
command: >
/bin/sh -c "python -m coverage run --branch --source='/opt/mrmap' /opt/mrmap/manage.py behave --simple --noinput --tags=-skip --no-skipped tests/behave/features && python -m coverage xml -i -o acceptance-tests-coverage-report.xml"
hostname: "mrmap-behave"
volumes:
- type: bind
source: ./backend
target: /opt/mrmap
networks:
- mrmap-internal
env_file:
- ./docker/backend/.mrmap.env
- ./docker/backend/.mrmap.dev.env
environment:
- DJANGO_DEBUG=0
depends_on:
- postgis
- redis
django-tests:
build:
context: ./mrmap
dockerfile: ../docker/backend/alpine.Dockerfile
args:
MRMAP_PRODUCTION: 'False'
shm_size: '2gb' # Fix 'Failed to decode response from marionette' (https://stackoverflow.com/questions/49734915/)
tty: true # To support colorized log output of gherkin and other log information.
entrypoint: /opt/mrmap/.bash_scripts/wait_db.sh
command: >
/bin/sh -c "python -m coverage run --branch --source='/opt/mrmap' ./manage.py test /opt/mrmap/tests/ --noinput && python -m coverage xml -i -o unit-tests-coverage-report.xml"
hostname: "mrmap-django-tests"
volumes:
- type: bind
source: ./backend
target: /opt/mrmap
networks:
- mrmap-internal
env_file:
- ./docker/backend/.mrmap.env
- ./docker/backend/.mrmap.dev.env
environment:
- DJANGO_DEBUG=0
depends_on:
- postgis
- redis
- mapserver
backend:
build:
args:
MRMAP_PRODUCTION: "False"
container_name: backend-dev
env_file:
- docker/backend/.mrmap.env
- docker/backend/.mrmap.dev.env
ports:
- "0.0.0.0:8001:8001"
command: /bin/sh -c "python manage.py runserver 0.0.0.0:8001"
celery-worker:
build:
args:
MRMAP_PRODUCTION: "False"
env_file:
- ./docker/backend/.mrmap.env
- ./docker/backend/.mrmap.dev.env
command: >
/bin/sh -c "watchmedo auto-restart --directory=./ --pattern=*.py --recursive -- celery -A MrMap worker -E -l DEBUG -Q download,default,db-routines"
celery-beat:
build:
args:
MRMAP_PRODUCTION: "False"
env_file:
- ./docker/backend/.mrmap.env
- ./docker/backend/.mrmap.dev.env
command: >
/bin/sh -c "watchmedo auto-restart --directory=./ --pattern=*.py --recursive -- celery -A MrMap beat --loglevel INFO --scheduler django"
networks:
sonar:
null
volumes:
sonar-db: null