2018-01-24 23:46:39 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CYAN='\033[01;36m'
|
|
|
|
RED='\033[01;31m'
|
|
|
|
NC='\033[00m'
|
|
|
|
|
|
|
|
SCRIPT=$(readlink -f $0)
|
|
|
|
DIRNAME=$(dirname $SCRIPT)
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Pull updated images.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo -e "${CYAN}[${SCRIPT}] Pull updated images${NC}"
|
|
|
|
|
2018-12-18 19:34:59 +01:00
|
|
|
docker-compose -f $DIRNAME/docker-compose.yml pull
|
2018-01-24 23:46:39 +01:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
2018-01-25 09:17:28 +01:00
|
|
|
# Stop the containers.
|
2018-01-24 23:46:39 +01:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
2018-01-25 09:17:28 +01:00
|
|
|
echo -e "${CYAN}[${SCRIPT}] Stop the containers${NC}"
|
2018-01-24 23:46:39 +01:00
|
|
|
|
2019-11-13 04:02:59 +01:00
|
|
|
systemctl stop loki-server
|
2018-01-25 09:17:28 +01:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Start the containers.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo -e "${CYAN}[${SCRIPT}] Start the containers${NC}"
|
|
|
|
|
2019-11-13 04:02:59 +01:00
|
|
|
systemctl start loki-server
|
2018-01-24 23:46:39 +01:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
2018-12-09 19:06:35 +01:00
|
|
|
# Remove untagged images.
|
2018-01-24 23:46:39 +01:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
2018-12-09 19:06:35 +01:00
|
|
|
echo -e "${CYAN}[${SCRIPT}] Remove untagged images${NC}"
|
2018-01-24 23:46:39 +01:00
|
|
|
|
2018-12-18 19:39:20 +01:00
|
|
|
docker container prune -f
|
2018-12-11 20:25:54 +01:00
|
|
|
docker image prune -f
|