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 c85edba commit d829afa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ ENV CUSTOM_SCRIPTS_DIRECTORY ""

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

USER www-data
# USER www-data

EXPOSE 8080

Expand Down
13 changes: 11 additions & 2 deletions tools/docker/docker-entrypoint-ign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ 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} && cat /tmp/${CONFIG_FILE_NAME} > ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME}
rm /tmp/${CONFIG_FILE_NAME}
chmod 775 ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME}
sed "s%geonetwork4_api_url = \".*\"%geonetwork4_api_url = \"${GN4_API_URL}\"%" ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME} > /tmp/${CONFIG_FILE_NAME}
# && cat /tmp/${CONFIG_FILE_NAME} > ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME}
# rm /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}
chmod 444 ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME}
rm -f /tmp/${CONFIG_FILE_NAME}
fi

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

# run as www-data
su www-data

# Start Apache in foreground
/usr/sbin/apachectl -D FOREGROUND

0 comments on commit d829afa

Please sign in to comment.