-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
186 lines (178 loc) · 6.14 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
services:
app:
profiles: [ production, test ]
image: $MONITORENV_IMAGE:$MONITORENV_VERSION
container_name: monitorenv_backend
user: "monitorenv:${MONITORENV_LOGS_AND_BACKUPS_GID}"
environment:
- ENV_DB_URL=jdbc:postgresql://db:5432/$POSTGRES_DB?user=$POSTGRES_USER&password=$POSTGRES_PASSWORD
- FLYWAY_MIGRATION_PATH=${FLYWAY_MIGRATION_PATH}
- FRONTEND_GEOSERVER_NAMESPACE=${FRONTEND_GEOSERVER_NAMESPACE}
- FRONTEND_GEOSERVER_REMOTE_URL=${FRONTEND_GEOSERVER_REMOTE_URL}
- FRONTEND_GOOGLEMAPS_API_KEY=${FRONTEND_GOOGLEMAPS_API_KEY}
- FRONTEND_MATOMO_URL=${MONITORENV_MATOMO_URL}
- FRONTEND_MATOMO_ID=${MONITORENV_MATOMO_ID}
- FRONTEND_MAPBOX_KEY=${FRONTEND_MAPBOX_KEY}
- FRONTEND_METABASE_URL=${FRONTEND_METABASE_URL}
- FRONTEND_MONITORENV_VERSION=${MONITORENV_VERSION}
- FRONTEND_SENTRY_DSN=${SENTRY_DSN}
- FRONTEND_SENTRY_ENV=${ENVIRONMENT}
- FRONTEND_SENTRY_AUTH_TOKEN=${FRONTEND_SENTRY_AUTH_TOKEN}
- FRONTEND_SENTRY_TRACING_ORIGIN=${FRONTEND_SENTRY_TRACING_ORIGIN}
- FRONTEND_SHOM_KEY=${FRONTEND_SHOM_KEY}
- FRONTEND_MISSION_FORM_AUTO_UPDATE=${FRONTEND_MISSION_FORM_AUTO_UPDATE}
- FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED=${FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED}
- FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED=${FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED}
- FRONTEND_REPORTING_FORM_AUTO_UPDATE=${FRONTEND_REPORTING_FORM_AUTO_UPDATE}
- FRONTEND_DASHBOARD_ENABLED=${FRONTEND_DASHBOARD_ENABLED}
- FRONTEND_OIDC_AUTHORITY=${MONITORENV_OIDC_ISSUER_URI}
- FRONTEND_OIDC_CLIENT_ID=${MONITORENV_OIDC_CLIENT_ID}
- FRONTEND_OIDC_ENABLED=${MONITORENV_OIDC_ENABLED}
- FRONTEND_OIDC_REDIRECT_URI=${FRONTEND_OIDC_REDIRECT_URI}
- MONITORENV_OIDC_CACHE_IN_MINUTES=${MONITORENV_OIDC_CACHE_IN_MINUTES}
- MONITORENV_OIDC_ENABLED=${MONITORENV_OIDC_ENABLED}
- MONITORENV_OIDC_ISSUER_URI=${MONITORENV_OIDC_ISSUER_URI}
- MONITORENV_OIDC_USERINFO_ENDPOINT=${MONITORENV_OIDC_USERINFO_ENDPOINT}
- MONITORENV_URL=${MONITORENV_URL}
- MONITORFISH_API_KEY=${MONITORFISH_API_KEY}
- MONITORFISH_URL=${MONITORFISH_URL}
- SENTRY_DSN=${SENTRY_DSN}
- MONITORENV_SENTRY_ENABLED=${MONITORENV_SENTRY_ENABLED}
- RAPPORTNAV_URL=${RAPPORTNAV_URL}
- MONITORENV_API_KEY=${MONITORENV_API_KEY}
ports:
- ${BACKEND_HTTP_PORT}:8880
- 8000:8000
- 5000:5000
- 5001:5001
volumes:
- "${MONITORENV_LOGS_FOLDER}:/home/monitorenv/logs"
networks:
- backend_network
depends_on:
- db
restart: always
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8080/actuator/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: "json-file"
options:
max-size: "1024m"
db:
image: ghcr.io/mtes-mct/monitorenv/monitorenv-database:pg11-ts1.7.4-postgis3.3.2
container_name: monitorenv_database
user: ":${MONITORENV_LOGS_AND_BACKUPS_GID}"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- db-data:/var/lib/postgresql/data
- "${MONITORENV_BACKUPS_FOLDER}:/opt/monitorenv_backups"
# TODO: this was in docker-compose.override.yml
- "${MONITORENV_DATA_FOLDER}:/opt/data"
ports:
- ${POSTGRES_PORT}:5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 1s
timeout: 1s
retries: 30
networks:
- backend_network
restart: always
geoserver:
container_name: monitorenv_geoserver
profiles: [ dev, production ]
image: kartoza/geoserver:2.18.0
environment:
- GEOSERVER_ADMIN_PASSWORD=${GEOSERVER_ADMIN_PASSWORD}
- GEOSERVER_ADMIN_USER=${GEOSERVER_ADMIN_USER}
ports:
- ${GEOSERVER_PORT}:8080
volumes:
- geoserver-data:/opt/geoserver/data_dir
- geoserver-settings:/settings
healthcheck:
test: [ "CMD-SHELL", "curl --fail -s http://localhost:8080/geoserver/index.html || exit 1" ]
interval: 1m30s
timeout: 1s
retries: 30
networks:
- backend_network
restart: always
keycloak:
container_name: monitorenv_keycloak
profiles: [ dev ]
image: quay.io/keycloak/keycloak:latest
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
networks:
- backend_network
ports:
- "8085:8080"
volumes:
- ./infra/configurations/keycloack:/opt/keycloak/data/import
command:
- start-dev
- --import-realm
mock-geoserver:
profiles: [ test ]
image: wiremock/wiremock:3.8.0
networks:
- backend_network
ports:
- 8081:8080
volumes:
- ./frontend/cypress/mappings/geoserver:/home/wiremock/mappings
healthcheck:
test:
[
"CMD-SHELL",
"curl --fail http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=monitorfish:regulations&outputFormat=application/json&CQL_FILTER=topic=%27Ouest%20Cotentin%20Bivalves%27%20AND%20zone=%27Praires%20Ouest%20cotentin%27 || exit 1 ",
]
interval: 1s
timeout: 1s
retries: 30
mock-monitorfish:
profiles: [ dev, test ]
image: wiremock/wiremock:3.8.0
networks:
- backend_network
ports:
- 8082:8080
volumes:
- ./frontend/cypress/mappings/monitorfish:/home/wiremock/mappings
healthcheck:
test: [ "CMD-SHELL", "curl --fail http://localhost:8080/api/v1/mission_actions?missionId=34 || exit 1 " ]
interval: 1s
timeout: 1s
retries: 30
mock-rapportnav:
profiles: [ dev, test ]
image: wiremock/wiremock:3.8.0
networks:
- backend_network
ports:
- 8083:8080
volumes:
- ./frontend/cypress/mappings/rapportnav:/home/wiremock/mappings
healthcheck:
test: [ "CMD-SHELL", "curl --fail http://localhost:8080/api/v1/missions/34 || exit 1 " ]
interval: 1s
timeout: 1s
retries: 30
networks:
backend_network:
volumes:
db-data:
driver: local
geoserver-data:
driver: local
geoserver-settings:
driver: local