From 385d71475b936a1d70c03a6cdf30f08972df055f Mon Sep 17 00:00:00 2001 From: Matthew Gamble Date: Sat, 14 Nov 2020 21:32:43 +1100 Subject: [PATCH] Allow users to add custom http-level nginx config This is particularly useful if you need to add realip config, to ensure Privatebin's IP-based rate limiting works correctly. --- Dockerfile | 3 ++- files/nginx.conf | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 673948b..8c780ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,8 @@ RUN apk -U add \ && mv vendor /privatebin \ && sed -i "s#define('PATH', '');#define('PATH', '/privatebin/');#" index.php \ && apk del tar ca-certificates curl gnupg \ - && rm -f /privatebin.tar.gz* *.md /var/cache/apk/* + && rm -f /privatebin.tar.gz* *.md /var/cache/apk/* \ + && rm /etc/nginx/conf.d/default.conf COPY files/nginx.conf /etc/nginx/nginx.conf COPY files/php-fpm.conf /etc/php7/php-fpm.conf diff --git a/files/nginx.conf b/files/nginx.conf index 4cac0c7..db17a52 100644 --- a/files/nginx.conf +++ b/files/nginx.conf @@ -47,6 +47,8 @@ http { font/opentype image/svg+xml; + include /etc/nginx/conf.d/*.conf; + server { listen 80; root /var/www;