2024-10-28 21:17:14 +01:00
|
|
|
HOST=`echo $DATABASE_URL | grep -o "@.*/" | sed 's/.$//' | cut -c 2-`
|
|
|
|
NAME=`echo $DATABASE_URL | grep -o "/[[:alnum:]]*$" | cut -c 2-`
|
|
|
|
USER=`echo $DATABASE_URL | grep -o "//[[:alnum:]]*:" | grep -o "[[:alnum:]]*"`
|
|
|
|
PASSWD=`echo $DATABASE_URL | grep -o ":[[:alnum:]]*@" | grep -o "[[:alnum:]]*"`
|
|
|
|
printf "[server]\nHTTP_PORT = $PORT;\n" > /var/lib/gitea/custom/conf/app.ini
|
2024-10-28 21:50:50 +01:00
|
|
|
printf "DOMAIN = $HEROKU_APP_DEFAULT_DOMAIN_NAME\n" >> /var/lib/gitea/custom/conf/app.ini
|
2024-10-28 22:06:37 +01:00
|
|
|
printf "PROTOCOL = https\n" >> /var/lib/gitea/custom/conf/app.ini
|
2024-10-28 21:30:45 +01:00
|
|
|
printf "\n[database]\nDB_TYPE = postgres;\n" >> /var/lib/gitea/custom/conf/app.ini
|
2024-10-28 21:17:14 +01:00
|
|
|
printf "NAME = $NAME;\n" >> /var/lib/gitea/custom/conf/app.ini
|
|
|
|
printf "HOST = $HOST;\n" >> /var/lib/gitea/custom/conf/app.ini
|
|
|
|
printf "USER = $USER;\n" >> /var/lib/gitea/custom/conf/app.ini
|
|
|
|
printf "PASSWD = $PASSWD;\n" >> /var/lib/gitea/custom/conf/app.ini
|
2024-10-28 21:34:57 +01:00
|
|
|
printf "SSL_MODE=require ;\n" >> /var/lib/gitea/custom/conf/app.ini
|
2024-10-28 21:17:14 +01:00
|
|
|
cat /var/lib/gitea/custom/conf/app.ini
|
|
|
|
/usr/local/bin/gitea web -port $PORT
|