diff options
Diffstat (limited to 'docker/etc/s6/gitea/setup')
-rwxr-xr-x | docker/etc/s6/gitea/setup | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docker/etc/s6/gitea/setup b/docker/etc/s6/gitea/setup new file mode 100755 index 0000000000..27ca49db30 --- /dev/null +++ b/docker/etc/s6/gitea/setup @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ ! -d /data/git/.ssh ]; then + mkdir -p /data/git/.ssh + chmod 700 /data/git/.ssh +fi + +if [ ! -f /data/git/.ssh/environment ]; then + echo "GITEA_CUSTOM=/data/gitea" >| /data/git/.ssh/environment + chmod 600 /data/git/.ssh/environment +fi + +if [ ! -f /data/gitea/conf/app.ini ]; then + mkdir -p /data/gitea/conf + cp /etc/templates/app.ini /data/gitea/conf/app.ini +fi + +chown -R git:git /data/gitea /app/gitea /data/git +chmod 0755 /data/gitea /app/gitea /data/git |