diff --git a/Dockerfile b/Dockerfile index 4541d2f26..294027770 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,13 @@ FROM nginx:stable-alpine LABEL version="1.3" LABEL maintainer="Denys Vuika " + COPY nginx.conf /etc/nginx/nginx.conf +COPY --chown=nginx:nginx ./docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + WORKDIR /usr/share/nginx/html COPY dist/app/ . +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 000000000..556f478b7 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [[ $ACSURL ]]; then + sed -i s%{protocol}//{hostname}{:port}%"$ACSURL"%g /usr/share/nginx/html/app.config.json +fi + +nginx -g "daemon off;"