From 2632c80fa5705794144e71ef72a536e1db1ef9a6 Mon Sep 17 00:00:00 2001 From: Pavel Dmitriev Date: Tue, 23 Jun 2020 17:39:28 +0300 Subject: [PATCH] Initial commit --- Dockerfile | 25 +++++++++++++++++++++++++ build.sh | 3 +++ localtime | Bin 0 -> 1518 bytes nginx.conf | 42 ++++++++++++++++++++++++++++++++++++++++++ proxy-params.conf | 6 ++++++ supervisord.conf | 8 ++++++++ timezone | 1 + 7 files changed, 85 insertions(+) create mode 100644 Dockerfile create mode 100755 build.sh create mode 100644 localtime create mode 100644 nginx.conf create mode 100644 proxy-params.conf create mode 100644 supervisord.conf create mode 100644 timezone diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9a2cd1d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu + +#COPY apt-add-repos /usr/local/sbin +COPY timezone /etc/timezone +COPY localtime /etc/localtime + +RUN apt update -y \ + && apt-get install nginx supervisor -y + +RUN apt-get install certbot python-certbot-nginx cron -y + +#RUN rm -rf /var/www/html +COPY nginx.conf /etc/nginx/ +COPY proxy-params.conf /etc/nginx/ +#COPY fox-web /var/www/html + +#RUN a2enmod rewrite + +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +EXPOSE 80 +EXPOSE 443 +CMD ["/usr/bin/supervisord"] + + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..064294d --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build --tag=git.mxfox.ru/fox-proxy-lessl . diff --git a/localtime b/localtime new file mode 100644 index 0000000000000000000000000000000000000000..aeb4321f9dc1667e3c6fa183ee43d71ec8ffadcf GIT binary patch literal 1518 zcma)*OGs2v7=Z6}93SH&TbNEc_AoWI$EZD=@-d~Om`+Ge1y&Rll3;YGpn?`dNNp;J zf)PioJ( z!#elaUOn^B4n3=Lou0j^Ue9S>rt>Q2>ACaWIzPvy3sOGoLT8~W{E)5Yy~zp}9k?GZ zdOog-AHGv1H%HX`$Wyi8^gXq(>xNpiuSa=zoK&To2Xxt_0qD9 zdg+&Kx?;uwRq?V;`#!g+<#!A8is4FC*;lKo?&PZKBl)W4tflbm^LDp31M*E_GNhP(&5VeFA^bVPLHvnzV_>m$19`f=U-1zS$RHwks#zh%gUK$x&J&b_S&9_^9uj(=lR=UFk}T=W!Lf2S|_{7D)BC{0)dchIb_-9#Ww5L zJ%g;!zjcyN#eXtu&Cj{uo2>P>qk|B&AbLR*GZf7rszG#vC}$|zLDVx8{U8b&iiQvs zAv*FYP!gggL`_4{6QU?YQ;4b%T_MUsw1ub((HEjHL}Q4`5S<}PL$rpd4bj_B6o+UI zQQc5?BnZh6lA`U1bHvAyVp3v4vIJ=^ zS4zy4nig{t`^Mxs-8Ipo6e%rAky4=)DYF!rYAO`tr7EdV>XccEloq8(=`Z$Nikv-h dE=B%&o@bgV^1rJ5E6X1Te0fpO(qj$Hr% literal 0 HcmV?d00001 diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..62255c5 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,42 @@ +worker_processes 4; +daemon off; + +user root; + +error_log /var/log/nginx/nginx.error.log; + +events { + use epoll; + worker_connections 1024; + } + +include upstreams/*; +include maps/*; +include ldap/*; +http { + server_names_hash_max_size 2048; + log_format post '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent" "$request_body"'; + access_log /var/log/nginx/nginx.access.log; + include mime.types; + server_tokens off; + client_max_body_size 4g; + default_type application/octet-stream; + server_names_hash_bucket_size 64; +# push_stream_shared_memory_size 512k; + sendfile on; + tcp_nopush on; + keepalive_timeout 4; + tcp_nodelay on; + gzip on; + gzip_static always; + gzip_proxied any; + gzip_min_length 1100; + gzip_http_version 1.1; + gzip_buffers 4 8k; + gzip_comp_level 7; + gzip_types text/plain text/css application/javascript text/xml application/xml application/xml+rss text/javascript; + include conf/hosts/*.conf; +} + diff --git a/proxy-params.conf b/proxy-params.conf new file mode 100644 index 0000000..136a0d8 --- /dev/null +++ b/proxy-params.conf @@ -0,0 +1,6 @@ +proxy_redirect off; +proxy_buffering off; +proxy_set_header Host $host; +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 $scheme; diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 0000000..253942d --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,8 @@ +[supervisord] +nodaemon=true + +[program:cron] +command=cron -f + +[program:nginx] +command=/bin/bash -c "exec /usr/sbin/nginx -c /etc/nginx/nginx.conf" \ No newline at end of file diff --git a/timezone b/timezone new file mode 100644 index 0000000..94394e5 --- /dev/null +++ b/timezone @@ -0,0 +1 @@ +Europe/Moscow