Compare commits

..

No commits in common. "main" and "test" have entirely different histories.
main ... test

3 changed files with 4 additions and 11 deletions

View File

@ -1,10 +1,2 @@
# chmura-zajecia
1. Clone the repo.
2. Run
```
./deploy.sh
```
Loading the database may take a while.
3. On Postgres cofiguration page set SSL_MODE to required.

View File

@ -1 +1 @@
https://s464951-gitea-9bf54aff0fde.herokuapp.com/
https://s464951-gitea-fa34820a73f7.herokuapp.com/

5
run.sh
View File

@ -1,9 +1,10 @@
#!/bin/bash
FILE=/app/app_url.txt
FILE=./app_url.txt
ROOT_URL=$(cat $FILE)
printf($ROOT_URL)
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:]]*"`
@ -12,7 +13,7 @@ PASSWD=`echo $DATABASE_URL | grep -o ":[[:alnum:]]*@" | grep -o "[[:alnum:]]*"`
mkdir -p /var/lib/gitea/custom/conf
echo "[server]" > /var/lib/gitea/custom/conf/app.ini
echo "ROOT_URL = $ROOT_URL" >> /var/lib/gitea/custom/conf/app.ini
echo "ROOT_URL = $ROOT_URL >> /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