Skip to content

Commit

Permalink
[Updated - v0.4.5]
Browse files Browse the repository at this point in the history
- Updated nginx image version
  • Loading branch information
buildingwatsize committed Aug 27, 2024
1 parent 1bbd5ee commit 5435787
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Version History

### [v0.4.5] - `2024-08-27`

- Updated nginx image version

### [v0.4.4] - `2024-08-15`

- Updated dependencies
Expand Down Expand Up @@ -60,6 +64,7 @@

- First time ever, it contains a lot of dir/files but it was needed.

[v0.4.5]: https://github.com/buildingwatsize/vite-react-tailwind-recoil/releases/tag/v0.4.5
[v0.4.4]: https://github.com/buildingwatsize/vite-react-tailwind-recoil/releases/tag/v0.4.4
[v0.4.3]: https://github.com/buildingwatsize/vite-react-tailwind-recoil/releases/tag/v0.4.3
[v0.4.2]: https://github.com/buildingwatsize/vite-react-tailwind-recoil/releases/tag/v0.4.2
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM nginx:1.22-alpine
FROM nginx:1.26.2-alpine3.20
RUN rm -rf /usr/share/nginx/html/*
COPY nginx/default.conf /etc/nginx/conf.d/
WORKDIR /usr/share/nginx/html
COPY ./build .
CMD ["nginx", "-g", "daemon off;"]
COPY ./dist .
COPY .env.local .
ENTRYPOINT ["/bin/sh", "-c", "export $(grep -v '^#' .env.local | xargs) && \"$@\"", "-s"]
CMD ["/bin/sh" , "-c" , "envsubst \"$(printf '${%s} ' $(cat .env.local | cut -d'=' -f1))\" < /default.template.conf > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The Vite template with react plugin and tools for scaffolding your project
- [📝 Table of Contents](#-table-of-contents)
- [📦 Template contains](#-template-contains)
- [📝 Versions](#-versions)
- [v0.4.5 - `2024-08-27`](#v045---2024-08-27)
- [v0.4.4 - `2024-08-15`](#v044---2024-08-15)
- [v0.4.3 - `2024-06-25`](#v043---2024-06-25)
- [v0.4.2 - `2024-04-23`](#v042---2024-04-23)
Expand All @@ -34,6 +35,10 @@ The Vite template with react plugin and tools for scaffolding your project

## 📝 Versions

### v0.4.5 - `2024-08-27`

- Updated nginx image version

### v0.4.4 - `2024-08-15`

- Updated dependencies
Expand Down
24 changes: 24 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ server {
sendfile on;
default_type application/octet-stream;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
Expand All @@ -34,12 +37,33 @@ server {

root /usr/share/nginx/html;

location ~\.(git|txt|md|env) {
deny all;
return 404;
}

location /api/ {
proxy_pass http://$host:5000$request_uri;

proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Connection "upgrade";
}

location / {
try_files $uri $uri/ /index.html =404;

add_header X-Frame-Options "deny" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Content-Security-Policy "default-src https: data: 'unsafe-inline' 'self'" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate";
add_header Last-Modified $date_gmt;
add_header Pragma "no-cache";
if_modified_since off;
expires off;
etag off;
}

error_page 403 /403.html;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "buildingwatsize.vite-react-tailwind-recoil",
"private": true,
"version": "0.4.4",
"version": "0.4.5",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit 5435787

Please sign in to comment.