Migrating to node-serve (@warren-bank/serve)
This commit is contained in:
parent
9f194cc052
commit
2c9c2854be
2 changed files with 22 additions and 16 deletions
|
@ -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 website-firq-npx -dm npx serve public/ -p 9000 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find maintenance public -maxdepth 1 -printf '%p\n'; screen -S website-firq-npx -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 "cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S staging-firq-npx -dm npx serve staging/ -p 9100 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S staging-firq-npx -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 unlighthouse -dm npx serve unlighthouse/ -p 9101 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find unlighthouse -maxdepth 1 -printf '%p\n'; screen -S 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 website-firq-npx kill;"
|
||||
- echo "Enabeling maintenance mode"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm npx serve firq_dev/maintenance/ -p 9000 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -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 website-firq-npx kill" || true
|
||||
- echo "Restarting screen session"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm npx serve firq_dev/public/ -p 9000 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -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 staging-firq-npx kill" || true
|
||||
- echo "Restarting screen session"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S staging-firq-npx -dm npx serve firq_dev/staging/ -p 9100 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S staging-firq-npx -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 unlighthouse-results kill" || true
|
||||
- echo "Restarting screen session"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S unlighthouse-results -dm npx serve firq_dev/unlighthouse/ -p 9101 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S unlighthouse-results -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 website-firq-npx kill;" || true
|
||||
- echo "Enabeling maintenance mode"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm npx serve firq_dev/maintenance/ -p 9000 -c serve.json"
|
||||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm ~/serve firq_dev/maintenance/ -p 9000"
|
||||
- echo "Maintenance Website is up on https://firq.dev/"
|
||||
|
|
18
serve.json
18
serve.json
|
@ -1,14 +1,20 @@
|
|||
{
|
||||
"directoryListing": ["/!assets/**"],
|
||||
"headers": [
|
||||
{
|
||||
"source": "**/*.@(jpg|jpeg|gif|png|webp)",
|
||||
"cleanUrls": true,
|
||||
"directoryListing": false,
|
||||
"etag": true,
|
||||
"headers": [
|
||||
{
|
||||
"source" : "**/*.@(jpg|jpeg|gif|png|webp|svg)",
|
||||
"headers" : [{
|
||||
"key" : "Cache-Control",
|
||||
"value" : "no-cache"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}, {
|
||||
"source" : "404.html",
|
||||
"headers" : [{
|
||||
"key" : "Cache-Control",
|
||||
"value" : "no-cache"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue