From 16130bdb377792d5e18aa2130eb95234ed95568e Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sat, 14 May 2016 00:05:38 +0200 Subject: [PATCH] keep it simple --- proxy/Dockerfile | 13 +------------ proxy/{nginx.tmpl => nginx.conf} | 4 ++-- 2 files changed, 3 insertions(+), 14 deletions(-) rename proxy/{nginx.tmpl => nginx.conf} (80%) diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 56c3cef99..849d1c7a6 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -1,14 +1,3 @@ FROM nginx -# Get curl and dockerize -RUN apt-get update \ - && apt-get install -y curl \ - && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && curl -L https://github.com/jwilder/dockerize/releases/download/v0.2.0/dockerize-linux-amd64-v0.2.0.tar.gz | tar -C /usr/local/bin -xzv - -# Set default Transmission port and copy config template -ENV TRANSMISSION_PORT=9091 -COPY nginx.tmpl /etc/nginx/nginx.tmpl - -# Run nginx after dockerizing config -CMD [ "dockerize", "-template", "/etc/nginx/nginx.tmpl:/etc/nginx/nginx.conf", "nginx", "-g", "daemon off;" ] \ No newline at end of file +COPY nginx.conf /etc/nginx/nginx.conf \ No newline at end of file diff --git a/proxy/nginx.tmpl b/proxy/nginx.conf similarity index 80% rename from proxy/nginx.tmpl rename to proxy/nginx.conf index 9a6c0b481..7305757c7 100644 --- a/proxy/nginx.tmpl +++ b/proxy/nginx.conf @@ -5,10 +5,10 @@ events { http { server { - listen {{ .Env.PORT }}; + listen 8080; location / { - proxy_pass http://transmission:{{ .Env.TRANSMISSION_PORT }}; + proxy_pass http://transmission:9091; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;