diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | nginx-example.conf | 33 | ||||
-rw-r--r-- | virtlyst.ini | 3 | ||||
-rw-r--r-- | virtlyst.socket | 1 |
5 files changed, 55 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = virtlyst pkgdesc = Web interface to manage virtual machines with libvirt pkgver = 1.1.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/cutelyst/Virtlyst arch = x86_64 license = AGPL3 @@ -9,14 +9,16 @@ pkgbase = virtlyst depends = libvirt backup = etc/uwsgi/virtlyst.ini source = https://github.com/cutelyst/Virtlyst/archive/v1.1.0.tar.gz + source = nginx-example.conf source = virtlyst.ini source = virtlyst.service source = virtlyst.socket source = virtlyst.rules sha256sums = 64044e537672935de62ba9305c28bf3a51ee3591c3c8da6831cd03383a42ccb6 - sha256sums = 05ff24509f01eca681f2120beffcac5d05b15ba817e6ea9e3a07e4985112da55 + sha256sums = c90df514f70a853d482ea2bf225eb684dd42a845fef39eb929f480187146afd5 + sha256sums = 50e50b69331b9855a2277b716a885878eefdf60364d238dfcce2f033e7374886 sha256sums = e2c573630bc79d92d77202c54fbcb73720f97fce5606ca7d83640f455bb7f80b - sha256sums = 728147bfca9b3d4ffc8af71998fe555fe309e61fd2cebcd4501eaf26e0604da1 + sha256sums = 9f8c34aadfdd9c374b70e2322d6e7684879df2be3e37bd31a050364504da01e9 sha256sums = fb13f116e9b8268b642082ab8aac40fe2104dbb33e98ab925ab3633986c5fdca pkgname = virtlyst @@ -3,7 +3,7 @@ pkgname=virtlyst _projectname=Virtlyst pkgver=1.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="Web interface to manage virtual machines with libvirt" arch=('x86_64') url="https://github.com/cutelyst/Virtlyst" @@ -11,6 +11,7 @@ license=('AGPL3') depends=('cutelyst>=2.2.1' 'libvirt') makedepends=() source=("https://github.com/cutelyst/${_projectname}/archive/v${pkgver}.tar.gz" + "nginx-example.conf" "virtlyst.ini" "virtlyst.service" "virtlyst.socket" @@ -31,17 +32,24 @@ build() { package() { #make DESTDIR="$pkgdir/" install install -D -m755 "${srcdir}/build/src/libVirtlyst.so" -t "${pkgdir}/usr/lib/uwsgi/" + + install -d "${pkgdir}/usr/share/${pkgname}/" + cp -r "${srcdir}/${_projectname}-${pkgver}/root/static/" "${pkgdir}/usr/share/${pkgname}/static" + cp -r "${srcdir}/${_projectname}-${pkgver}/root/src/" "${pkgdir}/usr/share/${pkgname}/templates" + install -D -m644 "${srcdir}/virtlyst.ini" -t "${pkgdir}/etc/uwsgi/" install -D -m644 "${srcdir}/virtlyst.service" -t "${pkgdir}/usr/lib/systemd/system/" install -D -m644 "${srcdir}/virtlyst.socket" -t "${pkgdir}/usr/lib/systemd/system/" + + install -d -m750 "${pkgdir}/usr/share/polkit-1/rules.d/" install -D -m644 "${srcdir}/virtlyst.rules" "${pkgdir}/usr/share/polkit-1/rules.d/51-virtlyst.rules" - install -d "${pkgdir}/usr/share/${pkgname}/" - cp -r "${srcdir}/${_projectname}-${pkgver}/root/static/" "${pkgdir}/usr/share/${pkgname}/static" - cp -r "${srcdir}/${_projectname}-${pkgver}/root/src/" "${pkgdir}/usr/share/${pkgname}/templates" + + install -D -m644 "${srcdir}/nginx-example.conf" -t "${pkgdir}/usr/share/${pkgname}/" } sha256sums=('64044e537672935de62ba9305c28bf3a51ee3591c3c8da6831cd03383a42ccb6' - '05ff24509f01eca681f2120beffcac5d05b15ba817e6ea9e3a07e4985112da55' + 'c90df514f70a853d482ea2bf225eb684dd42a845fef39eb929f480187146afd5' + '50e50b69331b9855a2277b716a885878eefdf60364d238dfcce2f033e7374886' 'e2c573630bc79d92d77202c54fbcb73720f97fce5606ca7d83640f455bb7f80b' - '728147bfca9b3d4ffc8af71998fe555fe309e61fd2cebcd4501eaf26e0604da1' + '9f8c34aadfdd9c374b70e2322d6e7684879df2be3e37bd31a050364504da01e9' 'fb13f116e9b8268b642082ab8aac40fe2104dbb33e98ab925ab3633986c5fdca') diff --git a/nginx-example.conf b/nginx-example.conf new file mode 100644 index 000000000000..95970eb81062 --- /dev/null +++ b/nginx-example.conf @@ -0,0 +1,33 @@ +server { + server_name _; + listen 443 ssl http2; + # ssl_certificate …; + # ssl_certificate_key …; + + client_body_buffer_size 10M; + client_max_body_size 1024M; + + root /usr/share/virtlyst/static; + + location /static { + alias /usr/share/virtlyst/static; + access_log off; + expires 1d; + } + + location /ws { + proxy_set_header Host $host:$server_port; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_connect_timeout 600; + proxy_read_timeout 600; + proxy_pass http://unix:/run/virtlyst-ws.sock; + } + + location / { + include fastcgi_params; + fastcgi_pass unix:/run/virtlyst.sock; + fastcgi_keep_conn on; + } +} diff --git a/virtlyst.ini b/virtlyst.ini index ba20c724b992..c95da4171c48 100644 --- a/virtlyst.ini +++ b/virtlyst.ini @@ -4,7 +4,8 @@ threads = 4 application = /usr/lib/uwsgi/libVirtlyst.so static-map = /static=/usr/share/virtlyst/static chdir = / -http-socket = /run/virtlyst.sock +fastcgi-socket = /run/virtlyst.sock +http-socket = /run/virtlyst-ws.sock [Cutelyst] production = true diff --git a/virtlyst.socket b/virtlyst.socket index 8f402d196cc6..e17b0de2fe29 100644 --- a/virtlyst.socket +++ b/virtlyst.socket @@ -3,6 +3,7 @@ Description=Web interface to manage virtual machines with libvirt - socket [Socket] ListenStream=/run/virtlyst.sock +ListenStream=/run/virtlyst-ws.sock SocketMode=0660 SocketGroup=http |