simplify nginx configuration deployment

This commit is contained in:
Daniel Micay 2023-07-15 16:30:49 -04:00
parent fd5c6b0c58
commit 6b7dff0c64
3 changed files with 5 additions and 5 deletions

View File

@ -28,10 +28,8 @@ ssh $remote "rm -rf $target && cp -a $active $target"
rsync -rpcv --fsync --chmod=D755,F644 --delete static-tmp/ $remote:$target
ssh $remote "ln -snf $target /srv/element.grapheneos.org && sync /srv/element.grapheneos.org"
sed -i "s|/srv/element.grapheneos.org|$target|" nginx-tmp/nginx.conf
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/nginx.conf $remote:/etc/nginx/nginx.conf
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/mime.types $remote:/etc/nginx/mime.types
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/snippets/ $remote:/etc/nginx/snippets
echo "root $target;" > nginx-tmp/root_element.grapheneos.org.conf
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/{nginx.conf,mime.types,root_element.grapheneos.org.conf,snippets} $remote:/etc/nginx/
rsync -ptcv --fsync --chmod=755 {local-backup,remote-backup} $remote:/usr/local/bin/
rsync -ptcv --fsync --chmod=644 systemd/system/remote-backup.timer $remote:/etc/systemd/system/remote-backup.timer
rsync -ptcv --fsync --chmod=644 systemd/system/remote-backup.service $remote:/etc/systemd/system/remote-backup.service

View File

@ -182,7 +182,7 @@ http {
listen [::]:443 ssl http2;
server_name element.grapheneos.org;
root /srv/element.grapheneos.org;
include root_element.grapheneos.org.conf;
include snippets/security-headers.conf;
add_header Cross-Origin-Resource-Policy "cross-origin" always;

View File

@ -0,0 +1,2 @@
# placeholder for gixy
root /srv/element.grapheneos.org_a;