Add scripts for installing TeamSpeak
This commit is contained in:
parent
a283a6576b
commit
a99d480de2
3 changed files with 74 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
services:
|
||||
teamspeak:
|
||||
image: teamspeak
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
TS3SERVER_DB_PLUGIN: ts3db_mariadb
|
||||
TS3SERVER_DB_SQLCREATEPATH: create_mariadb
|
||||
TS3SERVER_DB_HOST: db
|
||||
TS3SERVER_DB_WAITUNTILREADY: 30
|
||||
TS3SERVER_LICENSE: accept
|
||||
db:
|
||||
image: mariadb
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
|
||||
volumes:
|
||||
- ./database:/var/lib/mysql
|
|
@ -0,0 +1,6 @@
|
|||
services:
|
||||
teamspeak:
|
||||
ports:
|
||||
- 9987:9987/udp
|
||||
- 10011:10011
|
||||
- 30033:30033
|
49
scripts/Common/Software/docker/services/teamspeak/main.fish
Normal file
49
scripts/Common/Software/docker/services/teamspeak/main.fish
Normal file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/env fish
|
||||
begin
|
||||
set -l dir (status dirname)
|
||||
set -l source "$dir/docker-compose.secrets.yml"
|
||||
source "$dir/../service.fish"
|
||||
|
||||
function installSW -V dir -V domain -V source
|
||||
set -l service "teamspeak"
|
||||
set -l pw (nix-shell -p keepassxc --run "keepassxc-cli generate --length 32")
|
||||
set -l db "TeamSpeak"
|
||||
set -l tsEnv "$(getServiceKey "$service").environment"
|
||||
set -l dbEnv "$(getServiceKey db).environment"
|
||||
initializeServiceInstallation $argv
|
||||
cp "$dir/docker-compose.base.yml" (getServiceRoot $argv)
|
||||
|
||||
USER="$service" begin
|
||||
yq "$tsEnv.TS3SERVER_DB_USER = env.USER" "$source" | \
|
||||
yq "$dbEnv.MARIADB_USER = env.USER"
|
||||
end | \
|
||||
PW="$pw" begin
|
||||
yq "$tsEnv.TS3SERVER_DB_PASSWORD = env.PW" | \
|
||||
yq "$dbEnv.MARIADB_PASSWORD = env.PW"
|
||||
end | \
|
||||
DB="$db" begin
|
||||
yq "$tsEnv.TS3SERVER_DB_NAME = env.DB" | \
|
||||
yq "$dbEnv.MARIADB_DATABASE = env.DB"
|
||||
end | \
|
||||
yq . | \
|
||||
sudo tee (getServiceSecretsConfig $argv) >/dev/null
|
||||
|
||||
installDockerService $argv
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
configureDockerService $argv
|
||||
end
|
||||
|
||||
function getServiceServers -V server
|
||||
end
|
||||
|
||||
function getServiceLocations
|
||||
end
|
||||
|
||||
function getBackupArgs -V root
|
||||
printf "%s\n" --hidden --no-ignore . --exclude "docker-compose.yml" "$root"
|
||||
end
|
||||
|
||||
runInstaller --force $argv
|
||||
end
|
Loading…
Reference in a new issue