Configure forgejo runner by default

This commit is contained in:
Manuel Thalmann 2024-11-26 15:42:18 +01:00
parent b150e2aa9a
commit b164c3f93b
2 changed files with 3 additions and 0 deletions

View file

@ -5,3 +5,4 @@ services:
- 127.0.0.1:1337:3000
- 127.0.0.1:1338:22
db: {}
runner: {}

View file

@ -24,6 +24,7 @@ begin
DOMAIN=(getServiceDomain $server) PW=$pw DB=Git USER=forgejo PW=$pw begin
set -l gitEnv "$(getServiceKey "$service").environment"
set -l actEnv "$(getServiceKey "runner").environment"
set -l dbEnv "$(getServiceKey "db").environment"
PORT=$port yq "$(getSSHPortKey) = env(PORT)" "$source" | \
@ -34,6 +35,7 @@ begin
yq "$dbEnv.MARIADB_DATABASE = env(DB)" | \
yq "$dbEnv.MARIADB_USER = env(USER)" | \
yq "$dbEnv.MARIADB_PASSWORD = env(PW)" | \
URL="https://$DOMAIN/" yq "$actEnv.GITEA_INSTANCE_URL = env(URL)" | \
sudo tee "$secrets" >/dev/null
end