From 0d17fb551d61de3f3e8b849c9079078113e314a3 Mon Sep 17 00:00:00 2001 From: maxlath Date: Thu, 27 Feb 2025 22:39:16 +0100 Subject: [PATCH] inventaire: add map tiles, analytics, and media storage configuration --- dotenv | 20 ++++++++++++++++++++ inventaire/docker-entrypoint.sh | 19 ++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/dotenv b/dotenv index 9f59e75..c70bda5 100644 --- a/dotenv +++ b/dotenv @@ -21,6 +21,26 @@ MAILER_SMTP_PORT=587 MAILER_SMTP_USERNAME=your_username_on_smtp.example.org MAILER_SMTP_PASSWORD=your_password_on_smtp.example.org +# Required to use MapBox tiles within leaflet maps +# See https://console.mapbox.com/account/access-tokens/ +MAP_TILES_ACCESS_TOKEN='youraccesstoken' + +# [OPTIONAL] Setup Matomo analytics https://matomo.org/ +MOTOMO_ENABLED=false +MOTOMO_ENDPOINT=https://yourmatomoendpoint/matomo.php +MOTOMO_IDSITE=1 +MOTOMO_REC=1 + +MEDIA_STORAGE_MODE=local +# Set MEDIA_STORAGE_MODE=swift and the following variables +# to store users and groups images in an OpenStack Swift container +SWIFT_USERNAME=customizedInLocalConfig +SWIFT_PASSWORD=customizedInLocalConfig +SWIFT_AUTH_URL=https://openstackEndpointToCustomize +SWIFT_PUBLIC_URL=https://swiftPublicURL +SWIFT_TENANT_NAME=12345678 +SWIFT_REGION=SBG-1 + ######## # Everything below is a default configuration # Modify if you know what you are doing diff --git a/inventaire/docker-entrypoint.sh b/inventaire/docker-entrypoint.sh index 76e1763..f1cbd75 100755 --- a/inventaire/docker-entrypoint.sh +++ b/inventaire/docker-entrypoint.sh @@ -17,7 +17,6 @@ module.exports = { orgName: '${ORG_NAME}', orgUrl: '${ORG_URL}', contactAddress: '${CONTACT_ADDRESS}', - db: { username: '${COUCHDB_USER}', password: '${COUCHDB_PASSWORD}', @@ -37,6 +36,24 @@ module.exports = { }, }, }, + mapTilesAccessToken: '${MAP_TILES_ACCESS_TOKEN}', + matomo: { + enabled: ${MOTOMO_ENABLED}, + endpoint: '${MOTOMO_ENDPOINT}', + idsite: ${MOTOMO_IDSITE}, + rec: ${MOTOMO_REC}, + }, + mediaStorage: { + mode: '${MEDIA_STORAGE_MODE}', + swift: { + username: '${SWIFT_USERNAME}', + password: '${SWIFT_PASSWORD}', + authUrl: '${SWIFT_AUTH_URL}', + publicURL: '${SWIFT_PUBLIC_URL}', + tenantName: '${SWIFT_TENANT_NAME}', + region: '${SWIFT_REGION}', + }, + }, } EOF