Skip to content

Commit

Permalink
Merge pull request #8 from squeeble-ink/feat/update-nginx-conf
Browse files Browse the repository at this point in the history
Updated nginx location conf imported by back-end repo
  • Loading branch information
TessavWalstijn authored Mar 4, 2024
2 parents 2939f6a + 8ed2e15 commit 753302b
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 123 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ jobs:
git clone [email protected]: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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions nginx/dev-location.conf
Original file line number Diff line number Diff line change
@@ -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;
}
61 changes: 0 additions & 61 deletions nginx/dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
10 changes: 10 additions & 0 deletions nginx/prd-location.conf
Original file line number Diff line number Diff line change
@@ -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;
}
61 changes: 0 additions & 61 deletions nginx/prd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 753302b

Please sign in to comment.