aboutsummaryrefslogtreecommitdiff
path: root/www-apps/wger/files
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2024-06-15 14:36:48 -0400
committerJulien Roy <julien@jroy.ca>2024-06-15 14:36:48 -0400
commit11545abc0d394162ca593fba2a0067bd119d0e95 (patch)
treeb8fdae60364b42c97ec158529fbbaf932efcdb1c /www-apps/wger/files
parentb4e2919f28ceeb72d318d1aa0602f70cb7378792 (diff)
downloadMrRoy-Overlay-11545abc0d394162ca593fba2a0067bd119d0e95.tar.gz
MrRoy-Overlay-11545abc0d394162ca593fba2a0067bd119d0e95.tar.bz2
MrRoy-Overlay-11545abc0d394162ca593fba2a0067bd119d0e95.zip
www-apps/wger: new package, add 2.3_pre20240614
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'www-apps/wger/files')
-rw-r--r--www-apps/wger/files/wger.confd8
-rw-r--r--www-apps/wger/files/wger.initd28
-rw-r--r--www-apps/wger/files/yarn.patch16
3 files changed, 52 insertions, 0 deletions
diff --git a/www-apps/wger/files/wger.confd b/www-apps/wger/files/wger.confd
new file mode 100644
index 0000000..7f90358
--- /dev/null
+++ b/www-apps/wger/files/wger.confd
@@ -0,0 +1,8 @@
+# Path to the wger settings file
+# SETTINGS_FILE=/etc/wger/settings.py
+
+# Address to listen to
+# LISTEN_ADDR=0.0.0.0
+
+# Port to listen to
+# LISTEN_PORT=8000
diff --git a/www-apps/wger/files/wger.initd b/www-apps/wger/files/wger.initd
new file mode 100644
index 0000000..e3988c3
--- /dev/null
+++ b/www-apps/wger/files/wger.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+SETTINGS_FILE=${SETTINGS_FILE:-/etc/wger/settings.py}
+LISTEN_ADDR=${LISTEN_ADDR:-0.0.0.0}
+LISTEN_PORT=${LISTEN_PORT:-8000}
+
+name="wger daemon"
+description="Self hosted FLOSS fitness/workout, nutrition and weight tracker"
+
+pidfile="/run/${RC_SVCNAME}.pid"
+command="/usr/bin/python"
+command_args="-m wger start --settings-path=${SETTINGS_FILE} --address=${LISTEN_ADDR} --port=${LISTEN_PORT}"
+command_background=true
+command_user="wger:wger"
+
+output_log="/var/log/wger.log"
+error_log="/var/log/wger.log"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o "$command_user" /var/lib/wger
+ checkpath -f -m 0644 -o "$command_user" "$output_log"
+}
diff --git a/www-apps/wger/files/yarn.patch b/www-apps/wger/files/yarn.patch
new file mode 100644
index 0000000..db2e20a
--- /dev/null
+++ b/www-apps/wger/files/yarn.patch
@@ -0,0 +1,16 @@
+diff --git a/wger/tasks.py b/wger/tasks.py
+index 81669a12f..9244973d2 100644
+--- a/wger/tasks.py
++++ b/wger/tasks.py
+@@ -91,11 +91,6 @@ def bootstrap(context, settings_path=None, database_path=None):
+ load_fixtures(context, settings_path=settings_path)
+ create_or_reset_admin(context, settings_path=settings_path)
+
+- # Download JS and CSS libraries
+- context.run('yarn install')
+- context.run('yarn build:css:sass')
+-
+-
+ @task(
+ help={
+ 'settings-path': 'Path to settings file (absolute path). Leave empty for default',