pull masto frontend from docker image

This commit is contained in:
Ruben 2025-10-22 19:57:39 -05:00
commit 63bfde9bcb
Signed by: sneexy
GPG key ID: 8ECFA045E63BC583

View file

@ -733,6 +733,7 @@ function fedi_sync_blocklists {
# update standalone frontends
function fedi_update_frontends {
local chuckya_image_url=ghcr.io/synth-download/mastodon:nightly
local chuckya_fe_url=https://github.com/sneexy-boi/synth.download/releases/download/fedi-frontend/chuckya-fe.zip
local akkoma_chuckya_url=https://github.com/sneexy-boi/synth.download/releases/download/fedi-frontend/akkoma-fe-chuckya.zip
local akkoma_iceshrimp_url=https://github.com/sneexy-boi/synth.download/releases/download/fedi-frontend/akkoma-fe-iceshrimp.zip
@ -751,31 +752,35 @@ function fedi_update_frontends {
wget "$1" -O /tmp/"$2".zip
unzip -o /tmp/"$2" -d $frontend_folder/"$3"
rm /tmp/"$2".zip
echo "${green}Okay.${normal}"
}
# TODO: it's probably possible to turn this into an array loop of some sort
echo "${blue}update-frontends:${normal} Updating standalone frontends..."
if [ -d "$frontend_folder" ]; then
# update mastodon
echo "${blue}Updating Mastodon...${normal}"
_repeat_process $chuckya_fe_url chuckya-fe chuckya-fe
# update merpstodon frontend files
echo "${blue}Updating Chuckya...${normal}"
chuckya_web=$(docker create "$chuckya_image_url")
mkdir -p $frontend_folder/chuckya-masto
docker cp "$chuckya_web:/opt/mastodon/public" "/var/www/fedi-frontends/chuckya-masto"
docker stop "$chuckya_web" && docker rm "$chuckya_web"
unset chuckya_web
echo "${green}Okay.${normal}"
# update mastodon
echo "${blue}Updating Standalone Chuckya...${normal}"
_repeat_process $chuckya_fe_url chuckya-fe chuckya-fe
# update akkoma iceshrimp
echo "${blue}Updating Akkoma for Iceshrimp.NET...${normal}"
_repeat_process $akkoma_iceshrimp_url akkoma-fe-iceshrimp akkoma-fe-iceshrimp
echo "${green}Okay.${normal}"
# update akkoma mastodon
echo "${blue}Updating Akkoma for Chuckya...${normal}"
_repeat_process $akkoma_chuckya_url akkoma-fe-chuckya akkoma-fe-chuckya
echo "${green}Okay.${normal}"
# update phanpy
echo "${blue}Updating Phanpy...${normal}"
_repeat_process $phanpy_url phanpy phanpy
echo "${green}Okay.${normal}"
# update pl-fe
echo "${blue}Updating pl-fe...${normal}"
_repeat_process $pl_fe_url pl-fe pl-fe
echo "${green}Okay.${normal}"
else
echo "${red}update-frontends:${normal} $frontend_folder doesn't exist."
return 1