#!/bin/sh if [ ! -d /run/nginx ]; then mkdir -p /run/nginx chown nginx /run/nginx fi while [ ! -f /data/gitea/conf/app.ini ]; do echo "Gitea configuration is still not ready waiting 10 seconds..." sleep 10 done GITEA_DOMAIN=$(iniget /data/gitea/conf/app.ini server DOMAIN) GITEA_DOMAIN=${GITEA_DOMAIN:-"localhost"} envsubst '${GITEA_DOMAIN}' < /etc/templates/nginx.conf > /etc/nginx/nginx.conf