mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 16:14:30 +00:00
3befabead0
sqlite-viewer can not edit sqlite. database client can connect to almost all common databases, which is very useful I think. Of cause, it can edit sqlite. https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-database-client2 And for using sqlite, sqlite3 is required. So also added a new feature: https://github.com/warrenbuckley/codespace-features found from: https://containers.dev/features (cherry picked from commit fc641b3a28300e13c822140556eca8d00f2b5196) Conflicts: .devcontainer/devcontainer.json trivial context conflict because AZure blob support was not added
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
tasks:
|
|
- name: Setup
|
|
init: |
|
|
cp -r contrib/ide/vscode .vscode
|
|
make deps
|
|
make build
|
|
command: |
|
|
gp sync-done setup
|
|
exit 0
|
|
- name: Run backend
|
|
command: |
|
|
gp sync-await setup
|
|
|
|
# Get the URL and extract the domain
|
|
url=$(gp url 3000)
|
|
domain=$(echo $url | awk -F[/:] '{print $4}')
|
|
|
|
if [ -f custom/conf/app.ini ]; then
|
|
sed -i "s|^ROOT_URL =.*|ROOT_URL = ${url}/|" custom/conf/app.ini
|
|
sed -i "s|^DOMAIN =.*|DOMAIN = ${domain}|" custom/conf/app.ini
|
|
sed -i "s|^SSH_DOMAIN =.*|SSH_DOMAIN = ${domain}|" custom/conf/app.ini
|
|
sed -i "s|^NO_REPLY_ADDRESS =.*|SSH_DOMAIN = noreply.${domain}|" custom/conf/app.ini
|
|
else
|
|
mkdir -p custom/conf/
|
|
echo -e "[server]\nROOT_URL = ${url}/" > custom/conf/app.ini
|
|
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
|
|
fi
|
|
export TAGS="sqlite sqlite_unlock_notify"
|
|
make watch-backend
|
|
- name: Run frontend
|
|
command: |
|
|
gp sync-await setup
|
|
make watch-frontend
|
|
openMode: split-right
|
|
|
|
vscode:
|
|
extensions:
|
|
- editorconfig.editorconfig
|
|
- dbaeumer.vscode-eslint
|
|
- golang.go
|
|
- stylelint.vscode-stylelint
|
|
- DavidAnson.vscode-markdownlint
|
|
- Vue.volar
|
|
- ms-azuretools.vscode-docker
|
|
- vitest.explorer
|
|
- cweijan.vscode-database-client2
|
|
- GitHub.vscode-pull-request-github
|
|
|
|
ports:
|
|
- name: Gitea
|
|
port: 3000
|