mirror of
https://github.com/GrapheneOS/matrix.grapheneos.org.git
synced 2024-12-17 20:04:42 -05:00
simplify nginx configuration deployment
This commit is contained in:
parent
fd5c6b0c58
commit
6b7dff0c64
@ -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
|
||||
|
@ -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;
|
||||
|
2
nginx/root_element.grapheneos.org.conf
Normal file
2
nginx/root_element.grapheneos.org.conf
Normal file
@ -0,0 +1,2 @@
|
||||
# placeholder for gixy
|
||||
root /srv/element.grapheneos.org_a;
|
Loading…
Reference in New Issue
Block a user