37 lines
1.3 KiB
Fish
Executable file
37 lines
1.3 KiB
Fish
Executable file
#!/bin/env fish
|
|
begin
|
|
set -l dir (status dirname)
|
|
set -l source "$dir/docker-compose.core.overrides.yml"
|
|
source "$dir/../service.fish"
|
|
|
|
function installSW -V dir -V domain -V source
|
|
set -l root (getServiceRoot $argv)
|
|
set -l tmPW (nix-shell -p keepassxc --run "keepassxc-cli generate --length 32")
|
|
set -l sqlPW (nix-shell -p keepassxc --run "keepassxc-cli generate --length 32")
|
|
initializeServiceInstallation $argv
|
|
|
|
sudo cp -rf "$dir"/{.dockerignore,docker-compose{.base,.overrides,.core{,.overrides}}.yml,parser.patch,tmforever-entrypoint.sh,trackmania.Dockerfile,xaseco-entrypoint.sh,xaseco.Dockerfile} "$root"
|
|
|
|
PW="$tmPW" yq "$(getServiceKey "tm").environment.TM_SUPERADMIN_PASSWORD = env(PW)" "$source" |
|
|
PW="$sqlPW" yq "$(getServiceKey "db").environment.MYSQL_PASSWORD = env(PW)" |
|
|
sudo tee "$root/$(basename "$source")" >/dev/null
|
|
|
|
installDockerService $argv
|
|
end
|
|
|
|
function configureSW -V dir
|
|
configureDockerService $argv
|
|
end
|
|
|
|
function getServiceServers
|
|
end
|
|
|
|
function getServiceLocations
|
|
end
|
|
|
|
function getExtraBackupPatterns
|
|
echo "^docker-compose\.core\.overrides\.yml\$"
|
|
end
|
|
|
|
runInstaller --force $argv --name tm-forever
|
|
end
|