File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,19 @@ tasks:
10
10
- name : Run backend
11
11
command : |
12
12
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
15
24
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
17
26
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
18
27
fi
19
28
export TAGS="sqlite sqlite_unlock_notify"
You can’t perform that action at this time.
0 commit comments