From 8ed2e15e7bb23711bae7fe73352029b4d36e9ef3 Mon Sep 17 00:00:00 2001 From: TessavWalstijn Date: Mon, 4 Mar 2024 20:43:17 +0100 Subject: [PATCH] Updated nginx location conf imported by be repo --- .github/workflows/deploy-dev.yml | 1 + .github/workflows/deploy-prd.yml | 1 + CHANGELOG.md | 6 ++++ nginx/dev-location.conf | 10 ++++++ nginx/dev.conf | 61 -------------------------------- nginx/prd-location.conf | 10 ++++++ nginx/prd.conf | 61 -------------------------------- package.json | 2 +- 8 files changed, 29 insertions(+), 123 deletions(-) create mode 100644 nginx/dev-location.conf create mode 100644 nginx/prd-location.conf diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 6ca4bed..3ddfe18 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -25,4 +25,5 @@ jobs: cd ./${{ vars.REPO_NAME }} git checkout develop rm ./nginx/prd.conf + rm ./nginx/prd-location.conf docker compose up dev -d --build diff --git a/.github/workflows/deploy-prd.yml b/.github/workflows/deploy-prd.yml index 4a89168..e8a1cc1 100644 --- a/.github/workflows/deploy-prd.yml +++ b/.github/workflows/deploy-prd.yml @@ -26,4 +26,5 @@ jobs: git clone git@github.com:squeeble-ink/${{ vars.REPO_NAME }}.git cd ./${{ vars.REPO_NAME }} rm ./nginx/dev.conf + rm ./nginx/dev-location.conf docker compose up prd -d --build diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a1ed9c..24c5c7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # SE Readme Changelog +## [[v2.1.4] - 2024/02/19](https://github.com/squeeble-ink/stackexchange.readme-stats/releases/tag/v2.1.4) + +### Fixed + +- nginx location conf now imported by backend repo + ## [[v2.1.3] - 2024/02/19](https://github.com/squeeble-ink/stackexchange.readme-stats/releases/tag/v2.1.3) ### Fixed diff --git a/nginx/dev-location.conf b/nginx/dev-location.conf new file mode 100644 index 0000000..0a6e00d --- /dev/null +++ b/nginx/dev-location.conf @@ -0,0 +1,10 @@ +location /se { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + + proxy_pass http://shackexchange_readme_stats_dev/se; +} \ No newline at end of file diff --git a/nginx/dev.conf b/nginx/dev.conf index 9822940..73f2d15 100644 --- a/nginx/dev.conf +++ b/nginx/dev.conf @@ -2,64 +2,3 @@ upstream shackexchange_readme_stats_dev { server 127.0.0.1:3071; keepalive 8; } - -server { - listen 80; - - server_name dev-api.squeeble.ink dev-api.sqbl.me; - - location /se { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - proxy_pass http://shackexchange_readme_stats_dev/se; - } -} - -server { - listen 443 ssl; - - ssl_certificate /etc/letsencrypt/live/squeeble.ink/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/squeeble.ink/privkey.pem; - - server_name dev-api.squeeble.ink; - - access_log /var/log/nginx/shackexchange_readme_stats_dev.log; - - location /se { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - proxy_pass http://shackexchange_readme_stats_dev/se; - } -} - -server { - listen 443 ssl; - - ssl_certificate /etc/letsencrypt/live/sqbl.me/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/sqbl.me/privkey.pem; - - server_name dev-api.sqbl.me; - - access_log /var/log/nginx/shackexchange_readme_stats_dev.log; - - location /se { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - proxy_pass http://shackexchange_readme_stats_dev/se; - } -} diff --git a/nginx/prd-location.conf b/nginx/prd-location.conf new file mode 100644 index 0000000..9019dc7 --- /dev/null +++ b/nginx/prd-location.conf @@ -0,0 +1,10 @@ +location /se { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + + proxy_pass http://shackexchange_readme_stats/se; +} diff --git a/nginx/prd.conf b/nginx/prd.conf index a99ddc2..c246eb8 100644 --- a/nginx/prd.conf +++ b/nginx/prd.conf @@ -2,64 +2,3 @@ upstream shackexchange_readme_stats { server 127.0.0.1:3070; keepalive 8; } - -server { - listen 80; - - server_name api.squeeble.ink api.sqbl.me; - - location /se { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - proxy_pass http://shackexchange_readme_stats/se; - } -} - -server { - listen 443 ssl; - - ssl_certificate /etc/letsencrypt/live/squeeble.ink/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/squeeble.ink/privkey.pem; - - server_name api.squeeble.ink; - - access_log /var/log/nginx/shackexchange_readme_stats.log; - - location /se { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - proxy_pass http://shackexchange_readme_stats/se; - } -} - -server { - listen 443 ssl; - - ssl_certificate /etc/letsencrypt/live/sqbl.me/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/sqbl.me/privkey.pem; - - server_name api.sqbl.me; - - access_log /var/log/nginx/shackexchange_readme_stats.log; - - location /se { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - proxy_pass http://shackexchange_readme_stats/se; - } -} diff --git a/package.json b/package.json index f2b96a9..0fcb494 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackexchange.readme-stats", - "version": "2.1.2", + "version": "2.1.4", "description": "Stack Exchange Readme Stats", "main": "index.js", "type": "module",