diff options
author | zeripath <art27@cantab.net> | 2021-12-01 18:08:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 18:08:27 +0000 |
commit | 7d0629adf859bebbbefcfbc5dedb457b75a7ce00 (patch) | |
tree | f97ee1b839a3293caea47fe917c802804602714f /docker/root | |
parent | 042cac5fedeec8af53080b9666fe043072f3a6be (diff) | |
download | gitea-7d0629adf859bebbbefcfbc5dedb457b75a7ce00.tar.gz gitea-7d0629adf859bebbbefcfbc5dedb457b75a7ce00.zip |
Use shadowing script for docker (#17846)
Too many docker users are caught out by the default location for the
app.ini file being environment dependent so that when they docker exec
into the container the gitea commands do not work properly and require
additional -c arguments to correctly pick up the configuration.
This PR simply shadows the gitea binary using variants of the FHS
compatible script to make the command gitea have the default locations
by default.
Fix #14468
Reference #17497
Reference #12082
Reference #8941
... amongst others ...
Replace #17501
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'docker/root')
-rwxr-xr-x | docker/root/etc/s6/gitea/run | 2 | ||||
-rw-r--r-- | docker/root/usr/local/bin/gitea | 17 |
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 "$@" + + |