From e28b445cd860155b543cf9bc313bef6d7d3b8de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sun, 20 Jun 2021 22:29:25 +0200 Subject: [PATCH] portainer: add nginx conf --- roles/portainer/templates/portainer.conf.j2 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 roles/portainer/templates/portainer.conf.j2 diff --git a/roles/portainer/templates/portainer.conf.j2 b/roles/portainer/templates/portainer.conf.j2 new file mode 100644 index 0000000..c61a7fe --- /dev/null +++ b/roles/portainer/templates/portainer.conf.j2 @@ -0,0 +1,20 @@ +server { + listen 80; + server_name portainer.{{ base_domain }}; + return 301 https://$host$request_uri; +} + +server { + server_name portainer.{{ base_domain }}; + listen 443 ssl http2; + + include /etc/nginx/snippets/authelia-endpoint.conf; + + location / { + include /etc/nginx/snippets/proxy.conf; + include /etc/nginx/snippets/authelia-auth.conf; + + set $upstream http://portainer:9000; # This example assumes a Docker deployment + proxy_pass $upstream; + } +} \ No newline at end of file