Initial commit

This commit is contained in:
Pavel Dmitriev 2020-06-23 17:39:28 +03:00
commit 2632c80fa5
7 changed files with 85 additions and 0 deletions

25
Dockerfile Normal file
View File

@ -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"]

3
build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker build --tag=git.mxfox.ru/fox-proxy-lessl .

BIN
localtime Normal file

Binary file not shown.

42
nginx.conf Normal file
View File

@ -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;
}

6
proxy-params.conf Normal file
View File

@ -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;

8
supervisord.conf Normal file
View File

@ -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"

1
timezone Normal file
View File

@ -0,0 +1 @@
Europe/Moscow