You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
{% for service in expanded.services %}
|
|
server {
|
|
listen 443 http2 ssl;
|
|
server_name {{ service.fqdn }};
|
|
|
|
{%- if target == 'dev' %}
|
|
include snippets/snakeoil.conf;
|
|
{%- else %}
|
|
ssl_certificate /etc/letsencrypt/live/{{ service.domain }}/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/{{ service.domain }}/privkey.pem;
|
|
{%- endif %}
|
|
|
|
location / {
|
|
proxy_pass http://{{ service.container }}:{{ service.port }};
|
|
{%- if service.app == 'odoo15' %}
|
|
client_max_body_size 5M;
|
|
{%- endif %}
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
{%- if services[service.domain][service.subdomain]['data']['nginx']['extra'] %}
|
|
|
|
# From ... data.nginx.extra
|
|
{{ services[service.domain][service.subdomain]['data']['nginx']['extra'] }}
|
|
{%- endif %}
|
|
|
|
{%- if target != 'prod' %}
|
|
|
|
include snippets/banner_{{ target }}.conf;
|
|
{%- endif %}
|
|
}
|
|
|
|
{%- if service.app == 'odoo15' or service.app == 'odoo12' %}
|
|
location /longpolling {
|
|
proxy_pass http://{{ service.container }}:{{ service.port + 1000 }};
|
|
}
|
|
{%- endif %}
|
|
}
|
|
{% endfor %}
|