diff --git a/script.sh b/script.sh index a46f273..fb57769 100644 --- a/script.sh +++ b/script.sh @@ -3,6 +3,9 @@ # Database type DB_TYPE=postgres +# SSL mode +SSL_MODE=require + # Extract database credentials from DATABASE_URL if [[ $DATABASE_URL =~ ^postgres://([^:]*):([^@]*)@([^:]*):([0-9]+)/([^/]*)$ ]]; then USER="${BASH_REMATCH[1]}" @@ -23,8 +26,7 @@ mkdir -p /var/lib/gitea/custom/conf echo $ROOT_URL -# printf "[server]\nDOMAIN = $DOMAIN\n" > /var/lib/gitea/custom/conf/app.ini printf "[server]\nROOT_URL = $ROOT_URL\n" > /var/lib/gitea/custom/conf/app.ini -printf "[database]\nDB_TYPE = $DB_TYPE\nHOST = $HOST\nNAME = $NAME\nUSER = $USER\nPASSWD = $PASSWD\n" >> /var/lib/gitea/custom/conf/app.ini +printf "[database]\nDB_TYPE = $DB_TYPE\nHOST = $HOST\nNAME = $NAME\nUSER = $USER\nPASSWD = $PASSWD\nSSL_MODE = $SSL_MODE\n" >> /var/lib/gitea/custom/conf/app.ini /usr/local/bin/gitea web -port $PORT \ No newline at end of file