Merged client playbook and server playbook

This commit is contained in:
2023-04-18 14:52:43 +02:00
parent 2c76f99dd1
commit ec0dbee7bb
341 changed files with 153 additions and 811 deletions

View File

@@ -0,0 +1,19 @@
# role native-docker-reverse-proxy
Uses nginx as an [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy) for local docker applications.
## debug
```bash
curl -I {{address}}
```
- https://serverfault.com/questions/434915/nginx-proxy-caching-how-to-check-if-it-is-working
## performance
- https://stackoverflow.com/questions/33703230/caching-images-on-all-folder-levels-of-nginx-reverse-proxy
- https://www.tweaked.io/guide/nginx-proxying/
- https://serverfault.com/questions/796735/nginx-reverse-proxy-is-slow/796740
- https://serverfault.com/questions/741610/what-is-the-difference-between-proxy-request-buffering-and-proxy-buffering-on-ng
- https://askubuntu.com/questions/1103626/should-i-enable-client-max-body-size-proxy-request-buffering-and-proxy-bufferin
- https://serverfault.com/questions/692577/whats-the-difference-between-proxy-buffer-and-proxy-cache-module-in-nginx-confi
- https://github.com/sissbruecker/linkding/issues/88
- https://www.bogotobogo.com/DevOps/Docker/Docker-Compose-Nginx-Reverse-Proxy-Multiple-Containers.php

View File

@@ -0,0 +1,3 @@
dependencies:
- native-docker
- native-https-server

View File

@@ -0,0 +1,13 @@
server
{
server_name {{domain}};
{% if client_max_body_size is defined %}
client_max_body_size {{ client_max_body_size }};
{% endif %}
{% include 'roles/native-letsencrypt/templates/ssl_header.j2' %}
{% include 'proxy_pass.conf.j2' %}
}

View File

@@ -0,0 +1,20 @@
location /
{
proxy_pass http://127.0.0.1:{{http_port}}/;
# headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
# deactivate buffering
proxy_buffering off;
proxy_request_buffering off;
# timeouts
proxy_connect_timeout 1s;
proxy_send_timeout 900s;
proxy_read_timeout 900s;
send_timeout 900s;
}