1#!/bin/sh
2set -eu
3
4mkdir -p /custom/conf
5envsubst < /studio/app.ini > /custom/conf/app.ini
6chown "$USER_UID:$USER_GID" /custom/conf /custom/conf/app.ini
7chmod 750 /custom/conf
8chmod 600 /custom/conf/app.ini
9# The image's s6 bundle starts an SSH daemon on the host's port 22.
10exec /usr/bin/entrypoint /bin/bash -c 'source /etc/s6/gitea/setup; cd /app/gitea; exec su-exec git /usr/local/bin/gitea web'