From 0c8e0b591a08a85d4609a4c1e2a3678dbeec65db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Mon, 7 Oct 2024 21:12:39 +0200 Subject: [PATCH] Local dev setup --- Dockerfile | 4 +--- compose.yaml | 6 ++++++ docker/nginx.conf | 30 +++++++++++++++--------------- 3 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile index 8be794a..909ece3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ FROM node:16.9-alpine as build -ARG BUILD_REACT_APP_STYLEGUIDE_URL - -ENV REACT_APP_STYLEGUIDE_URL=${BUILD_REACT_APP_STYLEGUIDE_URL} +ENV REACT_APP_STYLEGUIDE_URL="https://styleguide.pirati.cz/2.7.1" RUN mkdir -p /home/node/cf diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..0ea70ed --- /dev/null +++ b/compose.yaml @@ -0,0 +1,6 @@ +services: + app: + image: cf + ports: + - "3000:80" + diff --git a/docker/nginx.conf b/docker/nginx.conf index 2392006..2fa58a1 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -1,9 +1,9 @@ -gzip on; -gzip_disable "MSIE [1-6]\\.(?!.*SV1)"; -gzip_proxied any; -gzip_comp_level 5; -gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml; -gzip_vary on; +#gzip on; +#gzip_disable "MSIE [1-6]\\.(?!.*SV1)"; +#gzip_proxied any; +#gzip_comp_level 5; +#gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml; +#gzip_vary on; server { listen 80; @@ -14,15 +14,15 @@ server { try_files $uri $uri/ /index.html; # X-Frame-Options is to prevent from clickJacking attack - add_header X-Frame-Options SAMEORIGIN; +# add_header X-Frame-Options SAMEORIGIN; # disable content-type sniffing on some browsers. - add_header X-Content-Type-Options nosniff; +# add_header X-Content-Type-Options nosniff; # This header enables the Cross-site scripting (XSS) filter - add_header X-XSS-Protection "1; mode=block"; +# add_header X-XSS-Protection "1; mode=block"; # This will enforce HTTP browsing into HTTPS and avoid ssl stripping attack - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; - add_header Referrer-Policy "no-referrer-when-downgrade"; - add_header Cache-Control "no-store, no-cache, must-revalidate"; +# add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; +# add_header Referrer-Policy "no-referrer-when-downgrade"; +# add_header Cache-Control "no-store, no-cache, must-revalidate"; } location /static { @@ -30,9 +30,9 @@ server { access_log off; # This will enforce HTTP browsing into HTTPS and avoid ssl stripping attack - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; - add_header Referrer-Policy "no-referrer-when-downgrade"; - add_header Cache-Control "public"; +# add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; +# add_header Referrer-Policy "no-referrer-when-downgrade"; +# add_header Cache-Control "public"; } error_page 500 502 503 504 /50x.html; -- GitLab