Добавлены конфиги для среды beta

This commit is contained in:
Book Pauk
2020-03-05 13:46:52 +07:00
parent 495ff57b19
commit de5b4216f7
3 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
server {
server_name beta.omnireader.ru;
client_max_body_size 50m;
proxy_read_timeout 1h;
gzip on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types *;
location /api {
proxy_pass http://127.0.0.1:34081;
}
location /ws {
proxy_pass http://127.0.0.1:34081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
root /home/beta.liberama/public;
location /tmp {
add_header Content-Type text/xml;
add_header Content-Encoding gzip;
}
location ~* \.(?:manifest|appcache|html)$ {
expires -1;
}
}
}
server {
listen 80;
server_name beta.omnireader.ru;
return 301 https://$host$request_uri;
}

4
docs/beta.omnireader/deploy.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
npm run build:linux
sudo -u www-data cp -r ../../dist/linux/* /home/beta.liberama

View File

@@ -0,0 +1,11 @@
#!/bin/bash
sudo -H -u www-data bash -c "\
while true; do\
trap '' 2;\
cd /var/www;\
/home/beta.liberama/liberama;\
trap 2;\
echo \"Restart after 5 sec. Press Ctrl+C to exit.\";\
sleep 5;\
done;"