Skip to content

Commit 443dcc2

Browse files
yardenshohamdelvh
andauthored
Write Gitpod app.ini only once (#23192)
Before this change, the `app.ini` would get overwritten on each workspace start, confusing Gitea. It asked for reinstallation each time. This makes sure the file is written only once by checking it does not exist before creating it. --- [Review without whitespace diff](https://github.com/go-gitea/gitea/pull/23192/files?w=1) --------- Co-authored-by: delvh <[email protected]>
1 parent cbc9a0f commit 443dcc2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.gitpod.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ tasks:
1010
- name: Run backend
1111
command: |
1212
gp sync-await setup
13-
mkdir -p custom/conf/
14-
echo -e "[server]\nROOT_URL=$(gp url 3000)/" > custom/conf/app.ini
15-
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
13+
if [ ! -f custom/conf/app.ini ]
14+
then
15+
mkdir -p custom/conf/
16+
echo -e "[server]\nROOT_URL=$(gp url 3000)/" > custom/conf/app.ini
17+
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
18+
fi
1619
export TAGS="sqlite sqlite_unlock_notify"
1720
make watch-backend
1821
- name: Run frontend

0 commit comments

Comments
 (0)