aboutsummaryrefslogtreecommitdiffstats
path: root/docker/root
diff options
context:
space:
mode:
Diffstat (limited to 'docker/root')
-rwxr-xr-xdocker/root/etc/s6/gitea/run2
-rw-r--r--docker/root/usr/local/bin/gitea17
2 files changed, 18 insertions, 1 deletions
diff --git a/docker/root/etc/s6/gitea/run b/docker/root/etc/s6/gitea/run
index b6150c10d5..7b858350f2 100755
--- a/docker/root/etc/s6/gitea/run
+++ b/docker/root/etc/s6/gitea/run
@@ -2,5 +2,5 @@
[[ -f ./setup ]] && source ./setup
pushd /app/gitea >/dev/null
-exec su-exec $USER /app/gitea/gitea web
+exec su-exec $USER /usr/local/bin/gitea web
popd
diff --git a/docker/root/usr/local/bin/gitea b/docker/root/usr/local/bin/gitea
new file mode 100644
index 0000000000..8a8f17bc4e
--- /dev/null
+++ b/docker/root/usr/local/bin/gitea
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+###############################################################
+# This script sets defaults for gitea to run in the container #
+###############################################################
+
+# It assumes that you place this script as gitea in /usr/local/bin
+#
+# And place the original in /usr/lib/gitea with working files in /data/gitea
+GITEA="/app/gitea/gitea"
+WORK_DIR="/app/gitea"
+CUSTOM_PATH="/data/gitea"
+
+# Provide docker defaults
+GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" GITEA_CUSTOM="${GITEA_CUSTOM:-$CUSTOM_PATH}" exec -a "$0" "$GITEA" $CONF_ARG "$@"
+
+