split static-deploy

This commit is contained in:
Daniel Micay 2024-03-08 23:40:08 -05:00
parent 57c235e242
commit 443b1215f4
2 changed files with 6 additions and 5 deletions

3
.gitignore vendored
View File

@ -2,6 +2,7 @@
/nginx-tmp/ /nginx-tmp/
/node_modules/ /node_modules/
/releases-base /releases-base
/static-deploy/ /static-production/
/static-staging/
/static-tmp/ /static-tmp/
/venv/ /venv/

View File

@ -19,9 +19,9 @@ rsync -pcv --chmod=F755 --fsync --preallocate certbot-replicate root@${servers[0
rsync -pcv --chmod=F644 --fsync --preallocate replicate.conf root@${servers[0]}:/etc/systemd/system/certbot-renew.service.d/ rsync -pcv --chmod=F644 --fsync --preallocate replicate.conf root@${servers[0]}:/etc/systemd/system/certbot-renew.service.d/
# use last modified timestamps from 0.grapheneos.org # use last modified timestamps from 0.grapheneos.org
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate root@${servers[0]}:/srv/grapheneos.org/ static-deploy rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate root@${servers[0]}:/srv/grapheneos.org/ static-production
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-deploy rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-production
for f in static-deploy/**.*(br|gz); do for f in static-production/**.*(br|gz); do
touch -r "${f%.*}" "$f" touch -r "${f%.*}" "$f"
done done
@ -42,7 +42,7 @@ for server in ${servers[@]}; do
echo echo
ssh $remote "rm -rf $target && cp -a $active $target" ssh $remote "rm -rf $target && cp -a $active $target"
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-deploy/ $remote:$target rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-production/ $remote:$target
ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org" ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org"
echo "root $target;" > nginx-tmp/root_grapheneos.org.conf echo "root $target;" > nginx-tmp/root_grapheneos.org.conf