diff --git a/datafeeder-ui/src/docker/Dockerfile b/datafeeder-ui/src/docker/Dockerfile index 6b7911c54c..ab9ad318e0 100644 --- a/datafeeder-ui/src/docker/Dockerfile +++ b/datafeeder-ui/src/docker/Dockerfile @@ -4,6 +4,8 @@ RUN rm -rf /usr/share/nginx/html/* COPY datafeeder-ui/dist/apps/datafeeder/ /usr/share/nginx/html COPY datafeeder-ui/nginx-default.conf /etc/nginx/conf.d/default.conf +COPY docker/copy-custom-scripts.sh /copy-custom-scripts.sh EXPOSE 80 +ENTRYPOINT ["/copy-custom-scripts.sh"] CMD ["nginx", "-g", "daemon off;"] diff --git a/datafeeder-ui/src/docker/copy-custom-scripts.sh b/datafeeder-ui/src/docker/copy-custom-scripts.sh new file mode 100755 index 0000000000..2e75d62554 --- /dev/null +++ b/datafeeder-ui/src/docker/copy-custom-scripts.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +DIR=/docker-entrypoint.d + +# Executing custom scripts located in CUSTOM_SCRIPTS_DIRECTORY if environment variable is set +if [[ -z "${CUSTOM_SCRIPTS_DIRECTORY}" ]]; then + echo "[INFO] No CUSTOM_SCRIPTS_DIRECTORY env variable set" +else + echo "[INFO] CUSTOM_SCRIPTS_DIRECTORY env variable set to ${CUSTOM_SCRIPTS_DIRECTORY}" + cp -v "${CUSTOM_SCRIPTS_DIRECTORY}"/* "$DIR" + echo "[INFO] End copying custom scripts" +fi + +exec /docker-entrypoint.sh "$@"