From c48f208343d4ceb31624a8febebb62e29150f1eb Mon Sep 17 00:00:00 2001 From: Anbraten Date: Mon, 29 Aug 2022 22:35:44 +0000 Subject: [PATCH 1/6] add gitpod config --- .gitpod.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000000..f8b1444df881 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,29 @@ +image: gitpod/workspace-full:latest + +tasks: + - name: Setup + init: | + make deps + echo -e "[server]\nROOT_URL = https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" >> ./custom/conf/app.ini + command: | + gp sync-done setup + exit 0 + - name: Run frontend + command: | + gp sync-await setup + make watch-frontend + - name: Run backend + command: | + gp sync-await setup + export TAGS="bindata sqlite sqlite_unlock_notify" + make watch-backend + +vscode: + extensions: + - editorconfig.editorconfig + - dbaeumer.vscode-eslint + - golang.go + +ports: + - name: Gitea + port: 3000 From 219c996df2d765d7176a23ada0074f634ee4df75 Mon Sep 17 00:00:00 2001 From: Anbraten Date: Mon, 29 Aug 2022 22:51:51 +0000 Subject: [PATCH 2/6] set correct gitea root url --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index f8b1444df881..ee94741d2cb5 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,7 +4,7 @@ tasks: - name: Setup init: | make deps - echo -e "[server]\nROOT_URL = https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" >> ./custom/conf/app.ini + export GITEA__server__ROOT_URL="https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" command: | gp sync-done setup exit 0 From d3b868f622928d2c3c9ac1c87d15481eb2edf312 Mon Sep 17 00:00:00 2001 From: Anbraten Date: Mon, 29 Aug 2022 23:07:28 +0000 Subject: [PATCH 3/6] fix frontend reloading and root-url --- .gitpod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index ee94741d2cb5..89235ece3e59 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,7 +4,6 @@ tasks: - name: Setup init: | make deps - export GITEA__server__ROOT_URL="https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" command: | gp sync-done setup exit 0 @@ -15,7 +14,8 @@ tasks: - name: Run backend command: | gp sync-await setup - export TAGS="bindata sqlite sqlite_unlock_notify" + export GITEA__server__ROOT_URL="https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" + export TAGS="sqlite sqlite_unlock_notify" make watch-backend vscode: From a50142f02fbbbc2e5aa8cbca159a746580b96982 Mon Sep 17 00:00:00 2001 From: Anbraten Date: Wed, 31 Aug 2022 22:23:24 +0000 Subject: [PATCH 4/6] add requested extensions --- .gitpod.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitpod.yml b/.gitpod.yml index 89235ece3e59..a3700c244484 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -23,6 +23,8 @@ vscode: - editorconfig.editorconfig - dbaeumer.vscode-eslint - golang.go + - stylelint.vscode-stylelint + - DavidAnson.vscode-markdownlint ports: - name: Gitea From 9cc14c8f9f09c6caa7ca16f2018e276a567d7151 Mon Sep 17 00:00:00 2001 From: Anbraten Date: Sat, 1 Oct 2022 14:48:46 +0000 Subject: [PATCH 5/6] fix setup --- .gitpod.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index a3700c244484..89c8a094050d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -14,7 +14,9 @@ tasks: - name: Run backend command: | gp sync-await setup - export GITEA__server__ROOT_URL="https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" + mkdir -p custom/conf/ + echo -e "[server]\nROOT_URL=https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" > custom/conf/app.ini + echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = /workspace/gitea/data/gitea.db" >> custom/conf/app.ini export TAGS="sqlite sqlite_unlock_notify" make watch-backend From 0d8c35c301af41ef066f636d62d7d380859b0ba1 Mon Sep 17 00:00:00 2001 From: Anbraten Date: Sat, 1 Oct 2022 14:55:27 +0000 Subject: [PATCH 6/6] add build to init to speed up server start --- .gitpod.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitpod.yml b/.gitpod.yml index 89c8a094050d..eb3114ce0b26 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,6 +4,7 @@ tasks: - name: Setup init: | make deps + make build command: | gp sync-done setup exit 0