Added caching to images
This commit is contained in:
parent
7b194c844e
commit
a1c365ae05
2 changed files with 14 additions and 1 deletions
|
@ -17,7 +17,7 @@ deploy-site:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- echo "Connecting to proxmox machine"
|
- echo "Connecting to proxmox machine"
|
||||||
- ssh $DEPLOY_USER@$DEPLOY_HOST -o StrictHostKeyChecking=no IdentitiesOnly=yes "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git reset --hard; git pull; rm -r -f node_modules; npm install; npm run build; cp -R public ~; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000"
|
- ssh $DEPLOY_USER@$DEPLOY_HOST -o StrictHostKeyChecking=no IdentitiesOnly=yes "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git reset --hard; git pull; rm -r -f node_modules; npm install; npm run build; cp -R public ~; cp server.json ~; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000 -c serve.json"
|
||||||
|
|
||||||
success_notification:
|
success_notification:
|
||||||
stage: notification
|
stage: notification
|
||||||
|
|
13
serve.json
Normal file
13
serve.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"source": "**/*.@(jpg|jpeg|gif|png|webp)",
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"key": "Cache-Control",
|
||||||
|
"value": "max-age=7200"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue