keep it simple

This commit is contained in:
Kristian Haugene
2016-05-14 00:05:38 +02:00
parent 43099d6800
commit 16130bdb37
2 changed files with 3 additions and 14 deletions

View File

@@ -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;" ]
COPY nginx.conf /etc/nginx/nginx.conf

View File

@@ -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;