From 6ba4ab054a4e68d1d382d4a8b842c77a9d68444f Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Fri, 19 Jul 2024 19:14:24 -0400 Subject: [PATCH 1/8] TEST Build from this branch --- .github/workflows/build-and-deploy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yaml b/.github/workflows/build-and-deploy.yaml index e7cd22c..a5ec379 100644 --- a/.github/workflows/build-and-deploy.yaml +++ b/.github/workflows/build-and-deploy.yaml @@ -8,7 +8,9 @@ jobs: if: > github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || - github.ref == 'refs/heads/development' + github.ref == 'refs/heads/development' || + github.ref == 'refs/heads/update-static-files-config' + strategy: matrix: From 631102c564dc28bb29d8e071177ef63b23ce4a00 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Fri, 19 Jul 2024 19:49:42 -0400 Subject: [PATCH 2/8] Add additional location match for static assets --- nginx/default.conf.template | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nginx/default.conf.template b/nginx/default.conf.template index 24a6b99..b49466e 100644 --- a/nginx/default.conf.template +++ b/nginx/default.conf.template @@ -1,6 +1,12 @@ server { listen 80; server_name sdnginx; + + location ~* /static/assets/(.*)$ { + autoindex on; + alias /staticfiles/$1; + } + location ~* /static/(.*)$ { autoindex on; alias /staticfiles/$1; From dde0923ad5366619c8db55eb1d0897f8c265577d Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Fri, 19 Jul 2024 21:15:26 -0400 Subject: [PATCH 3/8] Revert to orig config --- nginx/default.conf.template | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nginx/default.conf.template b/nginx/default.conf.template index b49466e..24a6b99 100644 --- a/nginx/default.conf.template +++ b/nginx/default.conf.template @@ -1,12 +1,6 @@ server { listen 80; server_name sdnginx; - - location ~* /static/assets/(.*)$ { - autoindex on; - alias /staticfiles/$1; - } - location ~* /static/(.*)$ { autoindex on; alias /staticfiles/$1; From 15f3d306bd1e39890243c1198d26381f18d157a1 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Fri, 19 Jul 2024 21:29:13 -0400 Subject: [PATCH 4/8] Update nginx conf --- nginx/default.conf.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nginx/default.conf.template b/nginx/default.conf.template index 24a6b99..a17f1c2 100644 --- a/nginx/default.conf.template +++ b/nginx/default.conf.template @@ -1,13 +1,14 @@ server { listen 80; server_name sdnginx; + location ~* /static/(.*)$ { autoindex on; alias /staticfiles/$1; } location / { - proxy_pass http://sdwebapp:8000/; + proxy_pass http://sdwebapp:8000; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; From a556c3253eedb3a6a4c9fa106d8a88c056abde6c Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Sat, 20 Jul 2024 19:11:36 -0400 Subject: [PATCH 5/8] Update location blocks --- nginx/default.conf.template | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nginx/default.conf.template b/nginx/default.conf.template index a17f1c2..a90be7d 100644 --- a/nginx/default.conf.template +++ b/nginx/default.conf.template @@ -1,7 +1,12 @@ server { listen 80; server_name sdnginx; - + + location ~* /static/assets(.*)$ { + autoindex on; + alias /staticfiles/$1; + } + location ~* /static/(.*)$ { autoindex on; alias /staticfiles/$1; From 251dd4a7b9f4ecdcea6c5e4518f6880d941f732f Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Sat, 20 Jul 2024 19:27:50 -0400 Subject: [PATCH 6/8] TEST Don't build test branch --- .github/workflows/build-and-deploy.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yaml b/.github/workflows/build-and-deploy.yaml index a5ec379..c879f1c 100644 --- a/.github/workflows/build-and-deploy.yaml +++ b/.github/workflows/build-and-deploy.yaml @@ -8,8 +8,7 @@ jobs: if: > github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || - github.ref == 'refs/heads/development' || - github.ref == 'refs/heads/update-static-files-config' + github.ref == 'refs/heads/development' strategy: From 5cac17850191743120a4dd13b558653b08bb6b76 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Sat, 20 Jul 2024 19:29:12 -0400 Subject: [PATCH 7/8] Remove accidentally added space --- .github/workflows/build-and-deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yaml b/.github/workflows/build-and-deploy.yaml index c879f1c..e7cd22c 100644 --- a/.github/workflows/build-and-deploy.yaml +++ b/.github/workflows/build-and-deploy.yaml @@ -10,7 +10,6 @@ jobs: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/development' - strategy: matrix: # Specify the docker-compose services to build images from From e1f12c298a513a1d6564ccb6d911325e8b4b461b Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Sat, 20 Jul 2024 19:30:18 -0400 Subject: [PATCH 8/8] Revert to use slash --- nginx/default.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/default.conf.template b/nginx/default.conf.template index a90be7d..2b8068e 100644 --- a/nginx/default.conf.template +++ b/nginx/default.conf.template @@ -13,7 +13,7 @@ server { } location / { - proxy_pass http://sdwebapp:8000; + proxy_pass http://sdwebapp:8000/; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr;