Skip to content

Commit

Permalink
Убрал brotli из-за сложной и нестабильной установки, но добавил http2
Browse files Browse the repository at this point in the history
  • Loading branch information
SergTyapkin committed Apr 27, 2024
1 parent 88c14f2 commit fb23fc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docker-deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ RUN export DOMAIN_URL=${DOMAIN_URL} && \
FROM nginx:${NGINX_RELEASE:-1.23}

#install nginx modules
RUN apt-get update -y && apt-get install --no-install-recommends -y \
nginx-plus-module-brotli
#RUN apt-get update -y && apt-get install --no-install-recommends -y \
# nginx-plus-module-brotli

COPY --from=build /home/node/front/dist /frontend-dist
COPY --from=build /home/node/front/docker-deploy/nginx/nginx.conf /etc/nginx/nginx-not-substituted.conf
Expand Down
12 changes: 7 additions & 5 deletions docker-deploy/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load_module modules/ngx_http_brotli_filter_module.so; # for compressing responses on-the-fly
load_module modules/ngx_http_brotli_static_module.so; # for serving pre-compressed files
# load_module modules/ngx_http_brotli_filter_module.so; # for compressing responses on-the-fly
# load_module modules/ngx_http_brotli_static_module.so; # for serving pre-compressed files

user nginx;
worker_processes auto;
Expand Down Expand Up @@ -27,7 +27,7 @@ http {
types_hash_max_size 2048;

gzip on;
brotli on;
# brotli on;

include /etc/nginx/mime.types;
default_type application/octet-stream;
Expand All @@ -43,10 +43,12 @@ http {
}

server {
listen 443 ssl default_server;
listen [::]:443 ssl;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2;
server_name ${DOMAIN_URL};

http2_push_preload on;

ssl_certificate /etc/nginx/ssl/live/${DOMAIN_URL}/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/${DOMAIN_URL}/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
Expand Down

0 comments on commit fb23fc2

Please sign in to comment.