Compare commits

...

8 Commits
test ... main

Author SHA1 Message Date
fb078fc495 Update README.md 2025-01-08 20:46:58 +01:00
7ece85ddda Update README.md 2025-01-08 20:38:00 +01:00
asmigiel
fe58e1eb08 test 2025-01-07 22:32:39 +01:00
asmigiel
6052b8a2d0 test 2025-01-07 22:30:33 +01:00
asmigiel
57dcfd2505 Deploy to Heroku 2025-01-07 22:23:03 +01:00
asmigiel
6d4736dfce Deploy to Heroku 2025-01-07 22:19:55 +01:00
asmigiel
535aceac12 Deploy to Heroku 2025-01-07 22:17:41 +01:00
e221729d95 Merge pull request 'test' (#1) from test into main
Reviewed-on: #1
2025-01-07 22:13:45 +01:00
3 changed files with 11 additions and 4 deletions

View File

@ -1,2 +1,10 @@
# 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-fa34820a73f7.herokuapp.com/
https://s464951-gitea-9bf54aff0fde.herokuapp.com/

5
run.sh
View File

@ -1,10 +1,9 @@
#!/bin/bash
FILE=./app_url.txt
FILE=/app/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:]]*"`
@ -13,7 +12,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