PortValhalla/scripts/Common/Software/docker/services/wekan/main.fish

47 lines
1.3 KiB
Fish
Raw Normal View History

2024-11-22 00:54:50 +00:00
#!/bin/env fish
begin
set -l dir (status dirname)
set -l service wekan
set -l domain due ""
source "$dir/../service.fish"
function installSW -V dir -V service -V domain
set -l domain (getServiceDomain $domain)
2024-11-27 02:41:26 +00:00
set -l overrides (getServiceOverrides $argv)
2024-11-22 00:54:50 +00:00
initializeServiceInstallation $argv
2024-11-27 02:41:26 +00:00
sudo cp "$dir/docker-compose.base.yml" (getServiceRoot $argv)
2024-11-29 00:13:58 +00:00
URL="https://$domain" yq "$(getServiceKey "$service").environment.ROOT_URL = env(URL)" "$dir/$(basename "$overrides")" |
2024-11-27 02:41:26 +00:00
sudo tee "$overrides" >/dev/null
2024-11-22 00:54:50 +00:00
installDockerService $argv
end
2024-12-04 15:58:41 +00:00
function configureSW -V dir
configureDockerService $argv
end
2024-11-22 00:54:50 +00:00
function getServiceServers -V domain
printf "%s\0" $domain
end
function getServiceLocations -V service
2024-12-04 15:58:51 +00:00
printf "%s\0" \
"$service" / "static files" \
"$service" "~ ^/sockjs/.*/websocket\$" "Websocket"
end
function getExtraLocationSettings -a domain s location -V service
if [ "$location" != "/" ]
printf "%s\n" \
'# Websocket' \
"proxy_http_version 1.1;" \
'proxy_set_header Upgrade $http_upgrade;' \
'proxy_set_header Connection "upgrade";'
end
2024-11-22 00:54:50 +00:00
end
runInstaller --force $argv
end