From bbb6cc11c2f0f41fa1c094dfd6195db853b6c11a Mon Sep 17 00:00:00 2001 From: Firq Date: Sat, 29 Jul 2023 13:55:48 +0200 Subject: [PATCH 1/4] testing new caching settings --- serve.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/serve.json b/serve.json index 3eba146..6f9caef 100644 --- a/serve.json +++ b/serve.json @@ -4,16 +4,24 @@ "etag": true, "headers": [ { - "source" : "**/*.@(jpg|jpeg|gif|png|webp|svg)", + "source" : "**/*.html", "headers" : [{ "key" : "Cache-Control", "value" : "no-cache" }] - }, { - "source" : "404.html", + }, + { + "source" : "**/*.css", "headers" : [{ "key" : "Cache-Control", - "value" : "no-cache" + "value" : "max-age=86400" + }] + }, + { + "source" : "**/*.@(jpg|jpeg|gif|png|webp|svg)", + "headers" : [{ + "key" : "Cache-Control", + "value" : "max-age=86400" }] } ] From 4ea64ca931cbf3c37113ab3e5241ceeb7d63579a Mon Sep 17 00:00:00 2001 From: Firq Date: Fri, 4 Aug 2023 21:52:15 +0200 Subject: [PATCH 2/4] Debugging --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b409aeb..f3c62fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,7 +84,7 @@ deploy-testing: - echo "Copying to proxmox machine" - rsync -az --stats public/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/staging - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S firq_dev-staging -dm serve staging/ -p 9100" + - ssh $DEPLOY_USER@$DEPLOY_HOST "which serve; echo $PATH; cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S firq_dev-staging -dm serve staging/ -p 9100" - echo "Staging environment is up!" unlighthouse: From 1728588e8bd06e3a0fea58ffa68def79dc045b7c Mon Sep 17 00:00:00 2001 From: Firq Date: Fri, 4 Aug 2023 22:07:07 +0200 Subject: [PATCH 3/4] Fixing env --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3c62fb..ed42c76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,7 +65,7 @@ deploy-site: - echo "Copying to proxmox machine" - rsync -az --stats public/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/public - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find maintenance public -maxdepth 1 -printf '%p\n'; screen -S firq_dev-public -dm serve public/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find maintenance public -maxdepth 1 -printf '%p\n'; screen -S firq_dev-public -dm serve public/ -p 9000" - echo "Website is up on https://firq.dev/" deploy-testing: @@ -84,7 +84,7 @@ deploy-testing: - echo "Copying to proxmox machine" - rsync -az --stats public/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/staging - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "which serve; echo $PATH; cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S firq_dev-staging -dm serve staging/ -p 9100" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S firq_dev-staging -dm serve staging/ -p 9100" - echo "Staging environment is up!" unlighthouse: @@ -123,7 +123,7 @@ unlighthouse-publish: - echo "Copying to proxmox machine" - rsync -az --stats unlighthouse-reports/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/unlighthouse - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find unlighthouse -maxdepth 1 -printf '%p\n'; screen -S firq_dev-unlighthouse -dm serve unlighthouse/ -p 9101" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find unlighthouse -maxdepth 1 -printf '%p\n'; screen -S firq_dev-unlighthouse -dm serve unlighthouse/ -p 9101" - echo "Unlighthouse results are up!" success_notification: @@ -165,7 +165,7 @@ maintenance-mode: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill;" || true - echo "Enabeling maintenance mode" - - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000" - echo "Maintenance Website is up on https://firq.dev/" redeploy-site: @@ -181,7 +181,7 @@ redeploy-site: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill" || true - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-public -dm serve firq_dev/public/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-public -dm serve firq_dev/public/ -p 9000" - echo "Website is up on https://firq.dev/" redeploy-staging: @@ -196,7 +196,7 @@ redeploy-staging: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-staging kill" || true - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-staging -dm serve firq_dev/staging/ -p 9100" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-staging -dm serve firq_dev/staging/ -p 9100" - echo "Staging environment is up!" redeploy-unlighthouse: @@ -211,7 +211,7 @@ redeploy-unlighthouse: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-unlighthouse kill" || true - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-unlighthouse -dm serve firq_dev/unlighthouse/ -p 9101" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-unlighthouse -dm serve firq_dev/unlighthouse/ -p 9101" - echo "Staging environment is up!" maintenance-deploy: @@ -226,5 +226,5 @@ maintenance-deploy: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill;" || true - echo "Enabeling maintenance mode" - - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000" - echo "Maintenance Website is up on https://firq.dev/" From 8ca2ec7e46a4e94d77c10042f978353f1fc9a92b Mon Sep 17 00:00:00 2001 From: Firq Date: Fri, 4 Aug 2023 22:14:50 +0200 Subject: [PATCH 4/4] Fixing Quotes --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed42c76..b1e4881 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,7 +65,7 @@ deploy-site: - echo "Copying to proxmox machine" - rsync -az --stats public/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/public - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find maintenance public -maxdepth 1 -printf '%p\n'; screen -S firq_dev-public -dm serve public/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find maintenance public -maxdepth 1 -printf "%p\n"; screen -S firq_dev-public -dm serve public/ -p 9000' - echo "Website is up on https://firq.dev/" deploy-testing: @@ -84,7 +84,7 @@ deploy-testing: - echo "Copying to proxmox machine" - rsync -az --stats public/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/staging - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S firq_dev-staging -dm serve staging/ -p 9100" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find staging -maxdepth 1 -printf "%p\n"; screen -S firq_dev-staging -dm serve staging/ -p 9100' - echo "Staging environment is up!" unlighthouse: @@ -123,7 +123,7 @@ unlighthouse-publish: - echo "Copying to proxmox machine" - rsync -az --stats unlighthouse-reports/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/unlighthouse - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find unlighthouse -maxdepth 1 -printf '%p\n'; screen -S firq_dev-unlighthouse -dm serve unlighthouse/ -p 9101" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; cd firq_dev; find unlighthouse -maxdepth 1 -printf "%p\n"; screen -S firq_dev-unlighthouse -dm serve unlighthouse/ -p 9101' - echo "Unlighthouse results are up!" success_notification: @@ -165,7 +165,7 @@ maintenance-mode: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill;" || true - echo "Enabeling maintenance mode" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000' - echo "Maintenance Website is up on https://firq.dev/" redeploy-site: @@ -181,7 +181,7 @@ redeploy-site: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill" || true - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-public -dm serve firq_dev/public/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-public -dm serve firq_dev/public/ -p 9000' - echo "Website is up on https://firq.dev/" redeploy-staging: @@ -196,7 +196,7 @@ redeploy-staging: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-staging kill" || true - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-staging -dm serve firq_dev/staging/ -p 9100" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-staging -dm serve firq_dev/staging/ -p 9100' - echo "Staging environment is up!" redeploy-unlighthouse: @@ -211,7 +211,7 @@ redeploy-unlighthouse: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-unlighthouse kill" || true - echo "Restarting screen session" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-unlighthouse -dm serve firq_dev/unlighthouse/ -p 9101" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-unlighthouse -dm serve firq_dev/unlighthouse/ -p 9101' - echo "Staging environment is up!" maintenance-deploy: @@ -226,5 +226,5 @@ maintenance-deploy: - echo "Stopping screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill;" || true - echo "Enabeling maintenance mode" - - ssh $DEPLOY_USER@$DEPLOY_HOST "PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000" + - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; screen -S firq_dev-maintenance -dm serve firq_dev/maintenance/ -p 9000' - echo "Maintenance Website is up on https://firq.dev/"