2022-10-11 18:15:14 +02:00
|
|
|
tasks:
|
|
|
|
- name: Setup
|
|
|
|
init: |
|
2022-10-24 04:24:33 +03:00
|
|
|
cp -r contrib/ide/vscode .vscode
|
2022-10-11 18:15:14 +02:00
|
|
|
make deps
|
|
|
|
make build
|
|
|
|
command: |
|
|
|
|
gp sync-done setup
|
|
|
|
exit 0
|
|
|
|
- name: Run backend
|
|
|
|
command: |
|
|
|
|
gp sync-await setup
|
2024-02-14 00:57:55 +02:00
|
|
|
|
|
|
|
# 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
|
2023-02-28 17:30:43 +02:00
|
|
|
mkdir -p custom/conf/
|
2024-02-14 00:57:55 +02:00
|
|
|
echo -e "[server]\nROOT_URL = ${url}/" > custom/conf/app.ini
|
2023-02-28 17:30:43 +02:00
|
|
|
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
|
|
|
|
fi
|
2022-10-11 18:15:14 +02:00
|
|
|
export TAGS="sqlite sqlite_unlock_notify"
|
|
|
|
make watch-backend
|
2023-01-20 21:46:33 +02:00
|
|
|
- name: Run frontend
|
|
|
|
command: |
|
|
|
|
gp sync-await setup
|
|
|
|
make watch-frontend
|
|
|
|
openMode: split-right
|
2022-10-11 18:15:14 +02:00
|
|
|
|
|
|
|
vscode:
|
|
|
|
extensions:
|
|
|
|
- editorconfig.editorconfig
|
|
|
|
- dbaeumer.vscode-eslint
|
|
|
|
- golang.go
|
|
|
|
- stylelint.vscode-stylelint
|
|
|
|
- DavidAnson.vscode-markdownlint
|
2023-05-09 21:03:50 +03:00
|
|
|
- Vue.volar
|
2022-10-12 19:17:04 +03:00
|
|
|
- ms-azuretools.vscode-docker
|
2024-03-20 01:08:42 +02:00
|
|
|
- vitest.explorer
|
2023-06-21 04:06:42 +09:00
|
|
|
- qwtel.sqlite-viewer
|
2023-07-14 16:58:02 +09:00
|
|
|
- GitHub.vscode-pull-request-github
|
2022-10-11 18:15:14 +02:00
|
|
|
|
|
|
|
ports:
|
|
|
|
- name: Gitea
|
|
|
|
port: 3000
|