#!/usr/bin/env bash set -euo pipefail # Create the home directory. if ! [ -d ${FORGEJO_HOME} ]; then mkdir -p ${FORGEJO_HOME} chmod 0700 ${FORGEJO_HOME} fi # Create the custom directory. if ! [ -d ${FORGEJO_CUSTOM} ]; then mkdir -p ${FORGEJO_CUSTOM} chmod 0500 ${FORGEJO_CUSTOM} fi # Move the dynamic Traefik config to the shared volume. if [ -f /flow/gitea/tmp/dynamic_git.yaml ]; then mv /flow/gitea/tmp/dynamic_git.yaml ${TRAEFIK_SHARED_MOUNT_POINT}/dynamic/dynamic_git.yaml fi if [ $# -gt 0 ]; then exec "$@" else exec ${FORGEJO_BIN} -c ${FORGEJO_APP_INI} web fi