Skip to content

Commit

Permalink
test parametrage datahub
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebarros committed Sep 5, 2024
1 parent eb12b4c commit 511597c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ ENV ASSETS_DIRECTORY_OVERRIDE ""
ENV CUSTOM_SCRIPTS_DIRECTORY ""

COPY dist/apps/${APP_NAME} /opt/catalogue/
RUN mv /opt/catalogue/assets/configuration/default.toml /opt/
RUN chmod +x /opt/docker-entrypoint-ign.sh
RUN chown -R www-data:www-data /opt/catalogue/assets/configuration

VOLUME /opt/catalogue/assets/configuration

USER www-data

Expand Down
6 changes: 2 additions & 4 deletions tools/docker/docker-entrypoint-ign.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/bin/bash
set -e

CONFIG_DIRECTORY=/opt/
APP_FILES_PATH=/opt/catalogue/
CONFIG_FILE_PATH=assets/configuration/
CONFIG_FILE_NAME=default.toml

if [ ! -z "${GN4_API_URL}" ]
then
echo "[INFO] Replacing GN4 url in conf with: ${GN4_API_URL}..."
sed "s%geonetwork4_api_url = \".*\"%geonetwork4_api_url = \"${GN4_API_URL}\"%" ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME} > /tmp/${CONFIG_FILE_NAME}
rm -f ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME}
cp /tmp/${CONFIG_FILE_NAME} ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME}
rm -f /tmp/${CONFIG_FILE_NAME}
sed "s%geonetwork4_api_url = \".*\"%geonetwork4_api_url = \"${GN4_API_URL}\"%" ${CONFIG_DIRECTORY}${CONFIG_FILE_NAME} > ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME}
fi

echo "[INFO] docker-entrypoint-ign.sh ended successfully."
Expand Down

0 comments on commit 511597c

Please sign in to comment.