diff --git a/Dockerfile b/Dockerfile index f8f76a1..150a8d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,9 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf \ && sed -i 's/^http {/&\n server_names_hash_bucket_size 128;/g' /etc/nginx/nginx.conf # Install Forego -ADD https://github.com/jwilder/forego/releases/download/v0.16.1/forego /usr/local/bin/forego -RUN chmod u+x /usr/local/bin/forego +RUN wget --quiet -O- https://bin.equinox.io/a/aHZqYk1TwYN/forego-20170111202937-linux-amd64.tar.gz \ + | tar xz -C /usr/local/bin/ \ + && chmod u+x /usr/local/bin/forego ENV DOCKER_GEN_VERSION 0.7.3 @@ -24,6 +25,7 @@ RUN wget https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VER && rm /docker-gen-linux-amd64-$DOCKER_GEN_VERSION.tar.gz COPY . /app/ +RUN chmod +x /app/*.sh WORKDIR /app/ ENV DOCKER_HOST unix:///tmp/docker.sock diff --git a/Dockerfile.alpine b/Dockerfile.alpine index b7443f0..749a83d 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -11,8 +11,9 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf \ && sed -i 's/^http {/&\n server_names_hash_bucket_size 128;/g' /etc/nginx/nginx.conf # Install Forego -ADD https://github.com/jwilder/forego/releases/download/v0.16.1/forego /usr/local/bin/forego -RUN chmod u+x /usr/local/bin/forego +RUN wget --quiet -O- https://bin.equinox.io/a/aHZqYk1TwYN/forego-20170111202937-linux-amd64.tar.gz \ + | tar xz -C /usr/local/bin/ \ + && chmod u+x /usr/local/bin/forego ENV DOCKER_GEN_VERSION 0.7.3 @@ -21,6 +22,7 @@ RUN wget --quiet https://github.com/jwilder/docker-gen/releases/download/$DOCKER && rm /docker-gen-alpine-linux-amd64-$DOCKER_GEN_VERSION.tar.gz COPY . /app/ +RUN chmod +x /app/*.sh WORKDIR /app/ ENV DOCKER_HOST unix:///tmp/docker.sock diff --git a/Procfile b/Procfile index 29fe166..2bd2401 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -dockergen: docker-gen -watch -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf -nginx: nginx +dockergen: docker-gen -watch -notify "nginx -s reload" -notify-output /app/nginx.tmpl /etc/nginx/conf.d/default.conf +nginx: nginx \ No newline at end of file diff --git a/dump.sh b/dump.sh new file mode 100755 index 0000000..32c49e1 --- /dev/null +++ b/dump.sh @@ -0,0 +1,10 @@ +#!/bin/bash +echo +echo "-------------------------------------------------------------------------------" +find /etc/nginx/ -type f -name '*.conf' -o -path '/etc/nginx/vhost.d/*' +echo +echo "-------------------------------------------------------------------------------" +find /etc/nginx/ -type f -name '*.conf' | while read config_file; do + echo "> $config_file" + awk '{printf "%3d %s\n", NR, $0}' "$config_file" +done \ No newline at end of file