Some checks failed
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
28 lines
740 B
Bash
28 lines
740 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Always execute relative to this script directory
|
|
cd "$(dirname "$0")"
|
|
|
|
# Charger les variables depuis .env s'il existe
|
|
if [[ -f ".env" ]]; then
|
|
# shellcheck disable=SC1091
|
|
source .env
|
|
fi
|
|
|
|
# Docker registry variables with default values
|
|
REGISTRY_HOST="${REGISTRY_HOST:-docker-registry.dev.home}"
|
|
REGISTRY_PORT="${REGISTRY_PORT:-5000}"
|
|
IMAGE_NAME="${IMAGE_NAME:-homelab-automation-api}"
|
|
REGISTRY="${REGISTRY_HOST}:${REGISTRY_PORT}"
|
|
IMAGE="${IMAGE_NAME}:latest"
|
|
|
|
# Pull latest image from private registry
|
|
docker image pull "${REGISTRY}/${IMAGE}"
|
|
|
|
# Restart stack with the current compose file
|
|
docker compose down
|
|
docker compose up -d --force-recreate
|
|
|
|
echo "Homelab Dashboard updated and running."
|