From dc9e794c280577717ba78185ee86b8f0985a5452 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 3 Mar 2015 15:25:24 +0100 Subject: [PATCH] add some nginx options --- Dockerfile | 4 ++-- docker-compose.yml | 2 +- examples/deploy/nginx/sites-enabled/app.conf | 15 ++++++--------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c745fd..919c006 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ RUN wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O bash miniconda.sh -b -p /opt/miniconda && \ rm miniconda.sh ENV PATH /opt/miniconda/bin:$PATH -RUN hash -r && \ +RUN hash -r && \ conda config --set always_yes yes --set changeps1 yes && \ conda update -q conda @@ -57,7 +57,7 @@ RUN conda install --file conda-requirements.txt && \ # Install Aubio RUN conda install -c thomasfillon aubio -# Link Yaafe in site-packages +# Link Yaafe in site-packages RUN ln -s /usr/lib/python2.7/dist-packages/yaafelib /opt/miniconda/lib/python2.7 # Clone app diff --git a/docker-compose.yml b/docker-compose.yml index 338668f..6162e31 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,7 +39,7 @@ nginx: #- ./examples/deploy/static/:/var/www/static volumes_from: - datastatic - - datamedia + - datamedia links: - app diff --git a/examples/deploy/nginx/sites-enabled/app.conf b/examples/deploy/nginx/sites-enabled/app.conf index 049e332..38ca77f 100644 --- a/examples/deploy/nginx/sites-enabled/app.conf +++ b/examples/deploy/nginx/sites-enabled/app.conf @@ -3,25 +3,23 @@ server_tokens off; server { listen 80; server_name nginx; + charset utf-8; - #proxy headers for additional info - proxy_set_header HOST $host; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - #charset utf-8;; - #access_log /var/log/nginx/log/host.access.log main; + access_log /var/log/nginx/app-access.log; + error_log /var/log/nginx/app-error.log; # max upload size client_max_body_size 75M; # adjust to taste - + # Django media location /media { alias /media; # your Django project's media files - amend as required + autoindex on; } # Django static location /static { alias /var/www/static; # your Django project's static files - amend as required + autoindex on; } location / { @@ -31,4 +29,3 @@ server { } } - \ No newline at end of file -- 2.39.5