# Ansible managed file - do not manually edit
#
server {
    server_name  {{ app.publish.domain }};
    root         /usr/share/nginx/html;

    location / {
        proxy_pass        http://dockerloopback:{{ app.publish.http }}/;
        proxy_set_header  Host $host;
    }

    listen 443           ssl;
    ssl_certificate      /etc/letsencrypt/live/{{ app.publish.domain }}/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/{{ app.publish.domain }}/privkey.pem;
    include              /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam          /etc/letsencrypt/ssl-dhparams.pem;
}

server {
    listen	 80;
    listen	 [::]:80;
    server_name  {{ app.publish.domain }};

    location ^~ /.well-known/acme-challenge/ {
        proxy_pass        http://dockerloopback:8088/.well-known/acme-challenge/;
        proxy_set_header  Host $host;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

# EOF
