Skip to content

Commit

Permalink
split static-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Mar 9, 2024
1 parent 2cade2e commit 32b9dea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/lock-server
/nginx-tmp/
/node_modules/
/static-deploy/
/static-production/
/static-staging/
/static-tmp/
/venv/
8 changes: 4 additions & 4 deletions deploy-static
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ fi
remote=root@attestation.app

# use last modified timestamps from attestation.app
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/attestation.app/ static-deploy
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-deploy
for f in static-deploy/**.*(br|gz); do
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/attestation.app/ static-production
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-production
for f in static-production/**.*(br|gz); do
touch -r "${f%.*}" "$f"
done

Expand All @@ -35,7 +35,7 @@ echo target is $target
echo

ssh $remote "rm -rf $target && cp -a $active $target"
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-deploy/ $remote:$target
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-production/ $remote:$target
ssh $remote "ln -snf $target /srv/attestation.app && sync /srv/attestation.app"

echo "root $target;" > nginx-tmp/root_attestation.app.conf
Expand Down

0 comments on commit 32b9dea

Please sign in to comment.