25 lines
563 B
Bash
25 lines
563 B
Bash
#!/usr/bin/env bash
|
|
# update.sh — Mise à jour du cockpit depuis le repo Gitea
|
|
# Usage : bash update.sh
|
|
set -euo pipefail
|
|
|
|
DEPLOY_DIR="/opt/openfin"
|
|
cd "$DEPLOY_DIR"
|
|
|
|
echo "[UPDATE] Pull de la dernière version..."
|
|
git pull
|
|
|
|
cd deploy
|
|
|
|
echo "[UPDATE] Sync config nginx (nginx-https.conf -> nginx.conf)..."
|
|
cp nginx/nginx-https.conf nginx/nginx.conf
|
|
|
|
echo "[UPDATE] Rebuild et redémarrage des containers..."
|
|
docker compose up -d --build
|
|
|
|
echo "[UPDATE] Nettoyage des images orphelines..."
|
|
docker image prune -f
|
|
|
|
echo "[UPDATE] Done. Statut :"
|
|
docker compose ps
|