Add git role

This commit is contained in:
polyfloyd 2024-04-21 19:15:10 +02:00
parent 303e188e24
commit 5dd519d88a
9 changed files with 215 additions and 0 deletions

View file

@ -0,0 +1,40 @@
# {{ ansible_managed }}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ git_server_domain }};
client_max_body_size 4G;
{% if git_server_bootstrap_cert %}
include "snippets/snakeoil.conf";
{% else %}
ssl_certificate "/var/lib/dehydrated/certs/{{ git_server_domain }}/fullchain.pem";
ssl_certificate_key "/var/lib/dehydrated/certs/{{ git_server_domain }}/privkey.pem";
{% endif %}
add_header X-Robots-Tag noindex;
location / {
proxy_pass http://localhost:9001;
include proxy_params;
}
location ~* \.keys$ {
deny all;
}
include "snippets/acme.conf";
}
server {
listen 80;
listen [::]:80;
server_name {{ git_server_domain }};
location / {
rewrite ^/(.*) https://$server_name$request_uri? redirect;
}
include "snippets/acme.conf";
}