Skip to content

Commit b474730

Browse files
yardenshohamGusted
and
Gusted
authored
Refactor Gitpod configuration to improve quick spin up of automated dev environments (#21411)
This commit instructs Gitpod to run `docs` in watch mode in fresh development environments so any dev could start hacking in seconds. Also included some vscode extensions for Vue, Go, and Docker. Try it here: [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/yardenshoham/gitea/tree/gitpod) Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: Gusted <[email protected]>
1 parent a902af7 commit b474730

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

.gitpod.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
image: gitpod/workspace-full:latest
2-
31
tasks:
42
- name: Setup
53
init: |
@@ -16,10 +14,13 @@ tasks:
1614
command: |
1715
gp sync-await setup
1816
mkdir -p custom/conf/
19-
echo -e "[server]\nROOT_URL=https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" > custom/conf/app.ini
20-
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = /workspace/gitea/data/gitea.db" >> custom/conf/app.ini
17+
echo -e "[server]\nROOT_URL=$(gp url 3000)/" > custom/conf/app.ini
18+
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
2119
export TAGS="sqlite sqlite_unlock_notify"
2220
make watch-backend
21+
- name: Run docs
22+
before: sudo bash -c "$(grep 'https://github.com/gohugoio/hugo/releases/download' Makefile | tr -d '\')" # install hugo
23+
command: cd docs && make clean update && hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
2324

2425
vscode:
2526
extensions:
@@ -28,7 +29,11 @@ vscode:
2829
- golang.go
2930
- stylelint.vscode-stylelint
3031
- DavidAnson.vscode-markdownlint
32+
- johnsoncodehk.volar
33+
- ms-azuretools.vscode-docker
3134

3235
ports:
3336
- name: Gitea
3437
port: 3000
38+
- name: Docs
39+
port: 1313

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
3434
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
3535
</a>
36+
<a href="https://gitpod.io/#https://github.com/go-gitea/gitea">
37+
<img
38+
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
39+
alt="Contribute with Gitpod"
40+
/>
41+
</a>
3642
<a href="https://crowdin.com/project/gitea" title="Crowdin">
3743
<img src="https://badges.crowdin.net/gitea/localized.svg">
3844
</a>

README_ZH.md

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
3434
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
3535
</a>
36+
<a href="https://gitpod.io/#https://github.com/go-gitea/gitea">
37+
<img
38+
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
39+
alt="Contribute with Gitpod"
40+
/>
41+
</a>
3642
<a href="https://crowdin.com/project/gitea" title="Crowdin">
3743
<img src="https://badges.crowdin.net/gitea/localized.svg">
3844
</a>

docs/content/doc/developers/hacking-on-gitea.en-us.md

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ menu:
1919

2020
{{< toc >}}
2121

22+
## Quickstart
23+
24+
To get a quick working development environment you could use Gitpod.
25+
26+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/go-gitea/gitea)
27+
2228
## Installing go
2329

2430
You should [install go](https://golang.org/doc/install) and set up your go

0 commit comments

Comments
 (0)