mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
Move var to http-basic, mirror config for Docker
This commit is contained in:
parent
fce35111aa
commit
a09e2d2c46
5 changed files with 42 additions and 36 deletions
|
|
@ -21,6 +21,7 @@ COPY --from=builder /build/entrypoint.sh .
|
||||||
COPY --from=builder /build/wait-for .
|
COPY --from=builder /build/wait-for .
|
||||||
COPY --from=builder /build/dist/mempool /var/www/mempool
|
COPY --from=builder /build/dist/mempool /var/www/mempool
|
||||||
COPY --from=builder /build/nginx.conf /etc/nginx/
|
COPY --from=builder /build/nginx.conf /etc/nginx/
|
||||||
|
COPY --from=builder /build/http-basic.conf /etc/nginx/
|
||||||
COPY --from=builder /build/nginx-mempool.conf /etc/nginx/conf.d/
|
COPY --from=builder /build/nginx-mempool.conf /etc/nginx/conf.d/
|
||||||
|
|
||||||
RUN chmod +x /patch/entrypoint.sh
|
RUN chmod +x /patch/entrypoint.sh
|
||||||
|
|
@ -30,6 +31,7 @@ RUN chown -R 1000:1000 /patch && chmod -R 755 /patch && \
|
||||||
chown -R 1000:1000 /var/cache/nginx && \
|
chown -R 1000:1000 /var/cache/nginx && \
|
||||||
chown -R 1000:1000 /var/log/nginx && \
|
chown -R 1000:1000 /var/log/nginx && \
|
||||||
chown -R 1000:1000 /etc/nginx/nginx.conf && \
|
chown -R 1000:1000 /etc/nginx/nginx.conf && \
|
||||||
|
chown -R 1000:1000 /etc/nginx/http-basic.conf && \
|
||||||
chown -R 1000:1000 /etc/nginx/conf.d && \
|
chown -R 1000:1000 /etc/nginx/conf.d && \
|
||||||
chown -R 1000:1000 /var/www/mempool
|
chown -R 1000:1000 /var/www/mempool
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ wget -O ./backend/GeoIP/GeoLite2-ASN.mmdb https://raw.githubusercontent.com/memp
|
||||||
localhostIP="127.0.0.1"
|
localhostIP="127.0.0.1"
|
||||||
cp ./docker/frontend/* ./frontend
|
cp ./docker/frontend/* ./frontend
|
||||||
cp ./nginx.conf ./frontend/
|
cp ./nginx.conf ./frontend/
|
||||||
|
cp ./http-basic.conf ./frontend/
|
||||||
cp ./nginx-mempool.conf ./frontend/
|
cp ./nginx-mempool.conf ./frontend/
|
||||||
sed -i"" -e "s/${localhostIP}:80/0.0.0.0:__MEMPOOL_FRONTEND_HTTP_PORT__/g" ./frontend/nginx.conf
|
sed -i"" -e "s/${localhostIP}:80/0.0.0.0:__MEMPOOL_FRONTEND_HTTP_PORT__/g" ./frontend/nginx.conf
|
||||||
sed -i"" -e "s/${localhostIP}/0.0.0.0/g" ./frontend/nginx.conf
|
sed -i"" -e "s/${localhostIP}/0.0.0.0/g" ./frontend/nginx.conf
|
||||||
|
|
|
||||||
36
http-basic.conf
Normal file
36
http-basic.conf
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
variables_hash_max_size 4096;
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
|
||||||
|
server_tokens off;
|
||||||
|
server_name_in_redirect off;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
# reset timed out connections freeing ram
|
||||||
|
reset_timedout_connection on;
|
||||||
|
# maximum time between packets the client can pause when sending nginx any data
|
||||||
|
client_body_timeout 10s;
|
||||||
|
# maximum time the client has to send the entire header to nginx
|
||||||
|
client_header_timeout 10s;
|
||||||
|
# timeout which a single keep-alive client connection will stay open
|
||||||
|
keepalive_timeout 69s;
|
||||||
|
# maximum time between packets nginx is allowed to pause when sending the client data
|
||||||
|
send_timeout 69s;
|
||||||
|
|
||||||
|
# number of requests per connection, does not affect SPDY
|
||||||
|
keepalive_requests 1337;
|
||||||
|
|
||||||
|
# enable gzip compression
|
||||||
|
gzip on;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_min_length 1000;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
# text/html is always compressed by gzip module
|
||||||
|
gzip_types application/javascript application/json application/ld+json application/manifest+json application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard;
|
||||||
|
|
||||||
|
# limit request body size
|
||||||
|
client_max_body_size 10m;
|
||||||
38
nginx.conf
38
nginx.conf
|
|
@ -10,46 +10,12 @@ events {
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
variables_hash_max_size 4096;
|
# HTTP basic configuration
|
||||||
sendfile on;
|
include /etc/nginx/http-basic.conf;
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
|
|
||||||
server_tokens off;
|
|
||||||
server_name_in_redirect off;
|
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
|
|
||||||
# reset timed out connections freeing ram
|
|
||||||
reset_timedout_connection on;
|
|
||||||
# maximum time between packets the client can pause when sending nginx any data
|
|
||||||
client_body_timeout 10s;
|
|
||||||
# maximum time the client has to send the entire header to nginx
|
|
||||||
client_header_timeout 10s;
|
|
||||||
# timeout which a single keep-alive client connection will stay open
|
|
||||||
keepalive_timeout 69s;
|
|
||||||
# maximum time between packets nginx is allowed to pause when sending the client data
|
|
||||||
send_timeout 69s;
|
|
||||||
|
|
||||||
# number of requests per connection, does not affect SPDY
|
|
||||||
keepalive_requests 1337;
|
|
||||||
|
|
||||||
# enable gzip compression
|
|
||||||
gzip on;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_min_length 1000;
|
|
||||||
gzip_proxied expired no-cache no-store private auth;
|
|
||||||
# text/html is always compressed by gzip module
|
|
||||||
gzip_types application/javascript application/json application/ld+json application/manifest+json application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard;
|
|
||||||
|
|
||||||
# limit request body size
|
|
||||||
client_max_body_size 10m;
|
|
||||||
|
|
||||||
# proxy cache
|
# proxy cache
|
||||||
proxy_cache off;
|
proxy_cache off;
|
||||||
proxy_cache_path /var/cache/nginx keys_zone=cache:20m levels=1:2 inactive=600s max_size=500m;
|
proxy_cache_path /var/cache/nginx keys_zone=cache:20m levels=1:2 inactive=600s max_size=500m;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# basics
|
# basics
|
||||||
|
variables_hash_max_size 4096;
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nopush on;
|
tcp_nopush on;
|
||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue