Configure forgejo runner by default

This commit is contained in:
Manuel Thalmann 2024-11-26 15:42:18 +01:00
parent 8fd621ac58
commit d15487950b
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:1337:3000
- 127.0.0.1:1338:22 - 127.0.0.1:1338:22
db: {} db: {}
runner: {}

View file

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