From 2e27fb0239e41fcc4a2333430764a8f84d9c3295 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 23 Apr 2021 23:31:10 +0200 Subject: [PATCH] Added woodpecker nginx conf --- nginx/.env.example | 6 +++++ .../sites-available/woodpecker.conf.template | 22 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 nginx/sites-available/woodpecker.conf.template diff --git a/nginx/.env.example b/nginx/.env.example index d63211e..81e3e0d 100644 --- a/nginx/.env.example +++ b/nginx/.env.example @@ -63,3 +63,9 @@ GITEA_HOST=gitea_app_1 PODGRAB_DOMAIN= ### Hostname PODGRAB_HOST=podgrab_app_1 + +## Woodpecker +### Domain name +WOODPECKER_DOMAIN= +### Hostname +WOODPECKER_HOST=woodpecker_app_1 diff --git a/nginx/sites-available/woodpecker.conf.template b/nginx/sites-available/woodpecker.conf.template new file mode 100644 index 0000000..af0f386 --- /dev/null +++ b/nginx/sites-available/woodpecker.conf.template @@ -0,0 +1,22 @@ +server { + # SSL Key locations + ssl_certificate /etc/letsencrypt/live/${WOODPECKER_DOMAIN}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/${WOODPECKER_DOMAIN}/privkey.pem; + + listen ${HTTPS_PORT} ssl; + listen [::]:${HTTPS_PORT} ssl; + server_name ${WOODPECKER_DOMAIN}; + + location / { + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $http_host; + + proxy_pass http://${WOODPECKER_HOST}:8000; + proxy_redirect off; + proxy_http_version 1.1; + proxy_buffering off; + + chunked_transfer_encoding off; + } +}