diff --git a/Dockerfile b/Dockerfile index 4a64b45fb..03231703e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,6 @@ COPY . ./ # delete default nginx config and link it to tandoors config RUN rm -rf /etc/nginx/http.d RUN ln -s /opt/recipes/nginx/conf.d /etc/nginx/http.d -CMD ["nginx", "-g", "daemon off;"] # commented for now https://github.com/TandoorRecipes/recipes/issues/3478 #HEALTHCHECK --interval=30s \ diff --git a/boot.sh b/boot.sh index 97434fc37..2347f31f9 100644 --- a/boot.sh +++ b/boot.sh @@ -92,3 +92,5 @@ if [ "$ipv6_disable" -eq 0 ]; then else exec gunicorn -b ":$TANDOOR_PORT" --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi fi + +exec nginx \ No newline at end of file diff --git a/nginx/conf.d/Recipes.conf b/nginx/conf.d/Recipes.conf index 7157fb47e..1d9c9e721 100644 --- a/nginx/conf.d/Recipes.conf +++ b/nginx/conf.d/Recipes.conf @@ -6,8 +6,8 @@ server { client_max_body_size 128M; # serve media files - location /media/ { - alias /media/; + location /media { + alias /opt/recipes/mediafiles; add_header Content-Disposition 'attachment; filename="$args"'; }