File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,19 @@ tasks:
1010 - name : Run backend
1111 command : |
1212 gp sync-await setup
13- if [ ! -f custom/conf/app.ini ]
14- then
13+
14+ # Get the URL and extract the domain
15+ url=$(gp url 3000)
16+ domain=$(echo $url | awk -F[/:] '{print $4}')
17+
18+ if [ -f custom/conf/app.ini ]; then
19+ sed -i "s|^ROOT_URL =.*|ROOT_URL = ${url}/|" custom/conf/app.ini
20+ sed -i "s|^DOMAIN =.*|DOMAIN = ${domain}|" custom/conf/app.ini
21+ sed -i "s|^SSH_DOMAIN =.*|SSH_DOMAIN = ${domain}|" custom/conf/app.ini
22+ sed -i "s|^NO_REPLY_ADDRESS =.*|SSH_DOMAIN = noreply.${domain}|" custom/conf/app.ini
23+ else
1524 mkdir -p custom/conf/
16- echo -e "[server]\nROOT_URL=$(gp url 3000) /" > custom/conf/app.ini
25+ echo -e "[server]\nROOT_URL = ${ url} /" > custom/conf/app.ini
1726 echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
1827 fi
1928 export TAGS="sqlite sqlite_unlock_notify"
You can’t perform that action at this time.
0 commit comments