mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Dockerization
This commit is contained in:
parent
bccfbb0010
commit
6f0c3dc5ac
5 changed files with 75 additions and 0 deletions
9
conf/runit/nginx
Executable file
9
conf/runit/nginx
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
if [[ ! -e /var/log/nginx/error.log ]]; then
|
||||
# The Nginx log forwarder might be sleeping and waiting
|
||||
# until the error log becomes available. We restart it in
|
||||
# 1 second so that it picks up the new log file quickly.
|
||||
(sleep 1 && sv restart /etc/service/nginx-log-forwarder)
|
||||
fi
|
||||
exec /usr/sbin/nginx
|
8
conf/runit/nginx-log-forwarder
Executable file
8
conf/runit/nginx-log-forwarder
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
# Forwards the Nginx error.log to the Docker logs.
|
||||
set -e
|
||||
if [[ -e /var/log/nginx/error.log ]]; then
|
||||
exec tail -F /var/log/nginx/error.log
|
||||
else
|
||||
exec sleep 10
|
||||
fi
|
4
conf/runit/novncd.sh
Executable file
4
conf/runit/novncd.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# `/sbin/setuser www-data` runs the given command as the user `www-data`.
|
||||
cd /srv/webvirtcloud
|
||||
exec /sbin/setuser www-data /srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd >> /var/log/novncd.log 2>&1
|
4
conf/runit/webvirtcloud.sh
Executable file
4
conf/runit/webvirtcloud.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# `/sbin/setuser www-data` runs the given command as the user `www-data`.
|
||||
cd /srv/webvirtcloud
|
||||
exec /sbin/setuser www-data /srv/webvirtcloud/venv/bin/gunicorn webvirtcloud.wsgi:application -c /srv/webvirtcloud/gunicorn.conf.py >> /var/log/webvirtcloud.log 2>&1
|
Loading…
Add table
Add a link
Reference in a new issue