From 5d9a11a6559215b65a35dc4d3bcec20742c51b59 Mon Sep 17 00:00:00 2001 From: Thibodeau Bruno Date: Sun, 19 Jun 2022 15:36:14 -0400 Subject: [PATCH] =?UTF-8?q?Correction,=20manquait=20config=20nginx=20non-g?= =?UTF-8?q?=C3=A9n=C3=A9r=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx_config/web-recipes.conf | 23 +++++++++++++++++++++++ setup.sh | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 nginx_config/web-recipes.conf diff --git a/nginx_config/web-recipes.conf b/nginx_config/web-recipes.conf new file mode 100644 index 0000000..2282972 --- /dev/null +++ b/nginx_config/web-recipes.conf @@ -0,0 +1,23 @@ +server { + listen 80; + server_name localhost; + + client_max_body_size 128M; + + # serve media files + location /media/ { + alias /media/; + } + # pass requests for dynamic content to gunicorn + location / { + proxy_set_header Host $http_host; + proxy_pass http://web_recipes:8080; + + error_page 502 /errors/http502.html; + } + + location /errors/ { + alias /etc/nginx/conf.d/errorpages/; + internal; + } +} diff --git a/setup.sh b/setup.sh index aaafe32..b1958ed 100755 --- a/setup.sh +++ b/setup.sh @@ -2,9 +2,10 @@ echo "-----Copie des fichiers dans /OPT. Serveur web sur port 8099" -mkdir /opt/tandoor-pod +mkdir -p /opt/tandoor-pod/nginx_config cp .env /opt/tandoor-pod cp docker-compose.yml /opt/tandoor-pod +cp web-recipes.conf /opt/tandoor-pod/nginx_config/. echo "-----Config firewall" firewall-cmd --add-port=8099/tcp --permanent