26 lines
663 B
Bash
Executable File
26 lines
663 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Restarts the Gemma 3 vLLM stack and shows service status.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
ENV_FILE="${REPO_ROOT}/.env"
|
|
|
|
log() {
|
|
printf '[restart] %s
|
|
' "$*"
|
|
}
|
|
|
|
if [[ ! -f "${ENV_FILE}" ]]; then
|
|
ENV_FILE="${REPO_ROOT}/.env.example"
|
|
fi
|
|
|
|
log "Stopping stack."
|
|
docker compose -f "${REPO_ROOT}/docker-compose.yml" --env-file "${ENV_FILE}" down
|
|
|
|
log "Starting stack."
|
|
docker compose -f "${REPO_ROOT}/docker-compose.yml" --env-file "${ENV_FILE}" up -d
|
|
|
|
log "Current status:"
|
|
docker compose -f "${REPO_ROOT}/docker-compose.yml" --env-file "${ENV_FILE}" ps
|