This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/scripts/portal-upgrade.sh

27 lines
644 B
Bash
Raw Normal View History

2020-09-14 15:40:18 +00:00
#!/bin/bash
set -e # exit on first error
2020-09-14 16:20:26 +00:00
# get current working directory (pwd doesn't cut it)
cwd=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
2020-09-14 15:40:18 +00:00
# put the server down for maintenance
. ${cwd}/portal-down.sh
2021-02-01 20:29:30 +00:00
# build all container without cache
docker-compose build --no-cache --parallel --pull --quiet
2020-09-21 16:48:46 +00:00
# stop the docker services
docker-compose down -v
2020-09-21 16:48:46 +00:00
# clear unused docker containers so we don't run into out of disk space
# it should be done after the container have been stopped and before
# building them again
docker system prune --force
# start the docker services
2020-09-14 15:40:18 +00:00
docker-compose up -d
# enable the server again
. ${cwd}/portal-up.sh