special mastodon upgrade treatment, add pdsadmin-web
This commit is contained in:
parent
dbf2abca6b
commit
3e3785777e
1 changed files with 18 additions and 1 deletions
19
helperbot
19
helperbot
|
|
@ -186,7 +186,6 @@ function update_docker_container {
|
|||
if [ -d "$1/$2" ]; then
|
||||
# pull the container
|
||||
cd "$1"/"$2" && docker compose -f "$1/$2/$3" pull
|
||||
docker compose -f "$1/$2/$3" down && docker compose -f "$1/$2/$3" up -d
|
||||
else
|
||||
echo "${red}docker:${normal} Folder $1/$2 does not exist."
|
||||
fi
|
||||
|
|
@ -217,10 +216,18 @@ function system_upgrade {
|
|||
update_docker_container "/srv/docker" "aode" "compose.yaml"
|
||||
update_docker_container "/srv/docker" "sharkey" "compose.yaml"
|
||||
update_docker_container "/srv/docker" "iceshrimp" "compose.yaml"
|
||||
# mastodon - requires db migrations to be executed manually
|
||||
update_docker_container "/srv/docker" "mastodon" "compose.yaml"
|
||||
cd /srv/docker/mastodon && \
|
||||
docker compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true web bundle exec rails db:migrate && \
|
||||
docker compose down && docker compose up -d && \
|
||||
docker compose run --rm web bundle exec rails db:migrate && \
|
||||
docker compose down && docker compose up -d &&
|
||||
# ========
|
||||
update_docker_container "/srv/docker" "pds" "compose.yaml"
|
||||
# done
|
||||
echo "${green}System upgrade finished! beep!~${normal}"
|
||||
echo "${yellow}Restart the system/selective services to complete upgrades.${normal}"
|
||||
elif [ "$synth_current_system" = "neptunium" ]; then # neptunium
|
||||
# apt/system related upgrade
|
||||
base_system_upgrade
|
||||
|
|
@ -253,8 +260,18 @@ function system_upgrade {
|
|||
cd /var/www/pds-dash && git pull && \
|
||||
deno install && \
|
||||
deno task build
|
||||
# pdsadmin-web
|
||||
echo "${blue}Updating pdsadmin-web...${normal}"
|
||||
if [ ! -x "$(command -v pnpm)" ]; then # pnpm is used here - npm DOES work, but rather use what the devs want
|
||||
echo "${red}Error(pdsadmin-web)${normal}: pnpm is not installed. Please install it and try again. Beep!"
|
||||
exit 1
|
||||
fi
|
||||
cd /var/www/pdsadmin-web && git pull && \
|
||||
pnpm i && \
|
||||
pnpm dev
|
||||
# done
|
||||
echo "${green}System upgrade finished! beep!~${normal}"
|
||||
echo "${yellow}Restart the system/selective services to complete upgrades.${normal}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue