diff --git a/Dockerfile b/Dockerfile index 69a8cdbec1f5d..4af6b0c0f57a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ ENV GOPROXY ${GOPROXY:-direct} ARG GITEA_VERSION ARG TAGS="sqlite sqlite_unlock_notify" ENV TAGS "bindata timetzdata $TAGS" +ENV LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.CustomPath=/data/gitea\" \ + -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/app/gitea\"" ARG CGO_EXTRA_CFLAGS #Build deps diff --git a/Dockerfile.rootless b/Dockerfile.rootless index f6430e5f69d45..a28abf10518ff 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -9,6 +9,9 @@ ENV GOPROXY ${GOPROXY:-direct} ARG GITEA_VERSION ARG TAGS="sqlite sqlite_unlock_notify" ENV TAGS "bindata timetzdata $TAGS" +ENV LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.CustomPath=/var/lib/gitea/custom\" \ + -X \"code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/conf.ini\" \ + -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea\"" ARG CGO_EXTRA_CFLAGS #Build deps diff --git a/contrib/fhs-compliant-script/gitea b/contrib/fhs-compliant-script/gitea index 019f838f92218..770e80aec46e0 100755 --- a/contrib/fhs-compliant-script/gitea +++ b/contrib/fhs-compliant-script/gitea @@ -37,6 +37,6 @@ if [ -z "$APP_INI_SET" ]; then fi # Provide FHS compliant defaults to -exec -a "$0" GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" "$GITEA" $CONF_ARG "$@" +GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" exec -a "$0" "$GITEA" $CONF_ARG "$@"