Files
Development/install.sh
T
2026-07-13 20:17:59 +02:00

39 lines
1.0 KiB
Bash

#!/bin/bash
set -Eeuo pipefail
########################################
# Farben
########################################
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
BLUE="\e[34m"
BOLD="\e[1m"
RESET="\e[0m"
########################################
# Logging
########################################
log_info() { echo -e "${BLUE}[INFO]${RESET} $1"; }
log_success() { echo -e "${GREEN}[OK]${RESET} $1"; }
log_warn() { echo -e "${YELLOW}[WARN]${RESET} $1"; }
log_error() { echo -e "${RED}[ERROR]${RESET} $1"; }
BASE_DIR="$(pwd)/WEBSERVER/"
TIMESTAMP=$(date +"%Y%m%d-%H%M%S")
HOSTNAME=$(hostname)
PUBLIC_REPO="https://gitea.mrhossa.de/bruno/Web-Public.git"
BACKEND_REPO="https://gitea.mrhossa.de/bruno/Backend.git"
if [[ "$EUID" -ne 0 ]]; then
log_error "Script muss als root laufen!"
exit 1
fi
git clone https://gitea.mrhossa.de/bruno/Backend.git $BASE_DIR/BACKEND
git -C $BASE_DIR/BACKEND checkout live
docker restart webserver_backend
git clone https://gitea.mrhossa.de/bruno/Web-Public.git $BASE_DIR/PUBLIC