services/templates/forgejo/entrypoint.sh.gotmpl
Dan Anglin 1758d5a85c
chore(traefik): move traefik config to traefik
Move codeflow traefik configuration template over to the traefik
template directory.
2023-08-26 11:48:45 +01:00

23 lines
455 B
Bash

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o 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
if [ $# -gt 0 ]; then
exec "$@"
else
exec {{ .Forgejo.Bin }} -c {{ .Forgejo.AppIni }} web
fi