test2
This commit is contained in:
parent
ba7224a059
commit
2e0733df3b
17
run.sh
17
run.sh
@ -5,10 +5,10 @@ echo $APP_URL
|
|||||||
echo DATABASE_URL
|
echo DATABASE_URL
|
||||||
echo $DATABASE_URL
|
echo $DATABASE_URL
|
||||||
|
|
||||||
export DB_HOST=$(heroku config:get DATABASE_URL | sed 's/.*\/\/\(.*\):\(.*\)\/.*/\1/')
|
HOST=`echo $DATABASE_URL | grep -o "@.*/" | sed 's/.$//' | cut -c 2-`
|
||||||
export DB_USER=$(heroku config:get DATABASE_URL | sed 's/.*\/\/\(.*\):\(.*\)\/.*/\1/')
|
NAME=`echo $DATABASE_URL | grep -o "/[[:alnum:]]*$" | cut -c 2-`
|
||||||
export DB_PASSWORD=$(heroku config:get DATABASE_URL | sed 's/.*:\/\/.*:\(.*\)@.*/\1/')
|
USER=`echo $DATABASE_URL | grep -o "//[[:alnum:]]*:" | grep -o "[[:alnum:]]*"`
|
||||||
export DB_NAME=$(heroku config:get DATABASE_URL | sed 's/.*\/\(.*\)/\1/')
|
PASSWD=`echo $DATABASE_URL | grep -o ":[[:alnum:]]*@" | grep -o "[[:alnum:]]*"`
|
||||||
|
|
||||||
mkdir -p /var/lib/gitea/custom/conf
|
mkdir -p /var/lib/gitea/custom/conf
|
||||||
|
|
||||||
@ -17,10 +17,11 @@ echo "ROOT_URL = $APP_URL" >> /var/lib/gitea/custom/conf/app.ini
|
|||||||
|
|
||||||
echo "[database]" >> /var/lib/gitea/custom/conf/app.ini
|
echo "[database]" >> /var/lib/gitea/custom/conf/app.ini
|
||||||
echo "DB_TYPE = postgres" >> /var/lib/gitea/custom/conf/app.ini
|
echo "DB_TYPE = postgres" >> /var/lib/gitea/custom/conf/app.ini
|
||||||
echo "HOST = $DB_HOST" >> /var/lib/gitea/custom/conf/app.ini
|
echo "HOST = $HOST" >> /var/lib/gitea/custom/conf/app.ini
|
||||||
echo "NAME = $DB_NAME" >> /var/lib/gitea/custom/conf/app.ini
|
echo "NAME = $NAME" >> /var/lib/gitea/custom/conf/app.ini
|
||||||
echo "USER = $DB_USER" >> /var/lib/gitea/custom/conf/app.ini
|
echo "USER = $USER" >> /var/lib/gitea/custom/conf/app.ini
|
||||||
echo "PASSWD = $DB_PASS" >> /var/lib/gitea/custom/conf/app.ini
|
echo "PASSWD = $PASSWD" >> /var/lib/gitea/custom/conf/app.ini
|
||||||
echo "SSL_MODE = require" >> /var/lib/gitea/custom/conf/app.ini
|
echo "SSL_MODE = require" >> /var/lib/gitea/custom/conf/app.ini
|
||||||
|
|
||||||
|
cat /var/lib/gitea/custom/conf/app.ini
|
||||||
/usr/local/bin/gitea web --port $PORT
|
/usr/local/bin/gitea web --port $PORT
|
Loading…
Reference in New Issue
Block a user