Browse Source

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

Book Pauk 5 years ago
parent
commit
de5b4216f7

+ 42 - 0
docs/beta.omnireader/beta.omnireader

@@ -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 - 0
docs/beta.omnireader/deploy.sh

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

+ 11 - 0
docs/beta.omnireader/run_server.sh

@@ -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;"