summaryrefslogtreecommitdiff
path: root/www-apps/netbox/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-28 09:54:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-28 09:54:45 +0100
commitb7ebc951da8800f711142f69d9d958bde67a112d (patch)
treee318514216845acb8f2e49fff7a5cba4027e9d91 /www-apps/netbox/files
parentdc7cbdfa65fd814b3b9aa3c56257da201109e807 (diff)
gentoo resync : 28.04.2019
Diffstat (limited to 'www-apps/netbox/files')
-rw-r--r--www-apps/netbox/files/gunicorn_config.py5
-rw-r--r--www-apps/netbox/files/netbox-2.5.10-no-pip.patch27
-rw-r--r--www-apps/netbox/files/netbox-rqworker.initd11
-rw-r--r--www-apps/netbox/files/netbox.initd10
4 files changed, 53 insertions, 0 deletions
diff --git a/www-apps/netbox/files/gunicorn_config.py b/www-apps/netbox/files/gunicorn_config.py
new file mode 100644
index 000000000000..4cb7111fac44
--- /dev/null
+++ b/www-apps/netbox/files/gunicorn_config.py
@@ -0,0 +1,5 @@
+command = '/usr/bin/gunicorn'
+pythonpath = '/opt/netbox/netbox'
+bind = '127.0.0.1:8001'
+workers = 3
+user = 'netbox'
diff --git a/www-apps/netbox/files/netbox-2.5.10-no-pip.patch b/www-apps/netbox/files/netbox-2.5.10-no-pip.patch
new file mode 100644
index 000000000000..5d1fa595f4e6
--- /dev/null
+++ b/www-apps/netbox/files/netbox-2.5.10-no-pip.patch
@@ -0,0 +1,27 @@
+diff --git a/upgrade.sh b/upgrade.sh
+index 24e79f5b..248e1cb5 100755
+--- a/upgrade.sh
++++ b/upgrade.sh
+@@ -8,22 +8,6 @@
+ PYTHON="python3"
+ PIP="pip3"
+
+-# TODO: Remove this in v2.6 as it is no longer needed under Python 3
+-# Delete stale bytecode
+-COMMAND="find . -name \"*.pyc\" -delete"
+-echo "Cleaning up stale Python bytecode ($COMMAND)..."
+-eval $COMMAND
+-
+-# Uninstall any Python packages which are no longer needed
+-COMMAND="${PIP} uninstall -r old_requirements.txt -y"
+-echo "Removing old Python packages ($COMMAND)..."
+-eval $COMMAND
+-
+-# Install any new Python packages
+-COMMAND="${PIP} install -r requirements.txt --upgrade"
+-echo "Updating required Python packages ($COMMAND)..."
+-eval $COMMAND
+-
+ # Apply any database migrations
+ COMMAND="${PYTHON} netbox/manage.py migrate"
+ echo "Applying database migrations ($COMMAND)..."
diff --git a/www-apps/netbox/files/netbox-rqworker.initd b/www-apps/netbox/files/netbox-rqworker.initd
new file mode 100644
index 000000000000..2973e471e038
--- /dev/null
+++ b/www-apps/netbox/files/netbox-rqworker.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 2019 Sony Interactive Entertainment Inc.
+# Distributed under the terms of the GNU General Public License v2
+
+name="netbox-rqworker daemon"
+description="nnetbox-rqworker daemon"
+command=/usr/bin/python3
+command_args="/opt/netbox/netbox/manage.py rqworker"
+command_user=netbox:netbox
+directory=/opt/netbox/netbox
+supervisor=supervise-daemon
diff --git a/www-apps/netbox/files/netbox.initd b/www-apps/netbox/files/netbox.initd
new file mode 100644
index 000000000000..d0457a8372f2
--- /dev/null
+++ b/www-apps/netbox/files/netbox.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+# Copyright 2019 Sony Interactive Entertainment Inc.
+# Distributed under the terms of the GNU General Public License v2
+
+description="netbox daemon"
+command=/usr/bin/gunicorn
+command_args="-c /etc/netbox/gunicorn_config.py netbox.wsgi"
+command_user=netbox:netbox
+directory=/opt/netbox/netbox
+supervisor=supervise-daemon