This commit is contained in:
awieczarek 2024-10-23 13:05:11 +02:00
parent 1126f1f12e
commit 4de784eb54

View File

@ -6,7 +6,7 @@ DB_TYPE="postgres"
USER=$(echo $DATABASE_URL | sed -e 's,.*//\(.*\):.*@.*,\1,') USER=$(echo $DATABASE_URL | sed -e 's,.*//\(.*\):.*@.*,\1,')
PASSWD=$(echo $DATABASE_URL | sed -e 's,.*//.*:\(.*\)@.*,\1,') PASSWD=$(echo $DATABASE_URL | sed -e 's,.*//.*:\(.*\)@.*,\1,')
HOST=$(echo $DATABASE_URL | sed -e 's,.*@\(.*\):\(.*\)/.*,\1,') HOST=$(echo $DATABASE_URL | sed -e 's,.*@\(.*\):\(.*\)/.*,\1,')
PORT=$(echo $DATABASE_URL | sed -e 's,.*@.*:\(.*\)/.*,\1,') PORT_DB=$(echo $DATABASE_URL | sed -e 's,.*@.*:\(.*\)/.*,\1,')
NAME=$(echo $DATABASE_URL | sed -e 's,.*/\(.*\)$,\1,') NAME=$(echo $DATABASE_URL | sed -e 's,.*/\(.*\)$,\1,')
SSL_MODE="require" SSL_MODE="require"
@ -16,7 +16,7 @@ printf "HTTP_PORT = $PORT\n" >> /var/lib/gitea/custom/conf/app.ini
printf "[database]\n" >> /var/lib/gitea/custom/conf/app.ini printf "[database]\n" >> /var/lib/gitea/custom/conf/app.ini
printf "DB_TYPE = $DB_TYPE\n" >> /var/lib/gitea/custom/conf/app.ini printf "DB_TYPE = $DB_TYPE\n" >> /var/lib/gitea/custom/conf/app.ini
printf "HOST = $HOST:$PORT\n" >> /var/lib/gitea/custom/conf/app.ini printf "HOST = $HOST:$PORT_DB\n" >> /var/lib/gitea/custom/conf/app.ini
printf "NAME = $NAME\n" >> /var/lib/gitea/custom/conf/app.ini printf "NAME = $NAME\n" >> /var/lib/gitea/custom/conf/app.ini
printf "USER = $USER\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 printf "PASSWD = $PASSWD\n" >> /var/lib/gitea/custom/conf/app.ini