Files
Oleksandr Bezdieniezhnykh c7b297de83
ci/woodpecker/push/01-test Pipeline failed
ci/woodpecker/push/02-build-push unknown status
refactor: remove deploy.cmd and update Dockerfile for health checks
- Deleted the deploy.cmd script as it was no longer needed.
- Updated Dockerfile to include curl for health checks and added a non-root user for improved security.
- Modified health check command to use curl for better reliability.
- Adjusted docker-compose.test.yml to reflect changes in health check configuration.
- Cleaned up appsettings.json and removed unused configuration properties.
- Removed Resource entity and related requests from the codebase as part of the architectural shift.
- Updated documentation to reflect the removal of hardware binding and related endpoints.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 08:47:21 +03:00

42 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# scripts/pull-images.sh — login + pull the target image. Idempotent.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$SCRIPT_DIR/_lib.sh"
usage() {
cat <<'EOF'
Usage: ./scripts/pull-images.sh [--help]
Reads from the environment (use scripts/deploy.sh which sources the overlays):
REGISTRY_HOST, REGISTRY_IMAGE, REGISTRY_TAG image coordinates
REGISTRY_USER, REGISTRY_TOKEN optional; if both set, docker login first
EOF
}
[[ "${1:-}" == "--help" || "${1:-}" == "-h" ]] && { usage; exit 0; }
require_env REGISTRY_HOST REGISTRY_IMAGE REGISTRY_TAG
require_cmd docker
IMAGE="$REGISTRY_HOST/$REGISTRY_IMAGE:$REGISTRY_TAG"
if [[ -n "${REGISTRY_USER:-}" && -n "${REGISTRY_TOKEN:-}" ]]; then
log_info "Logging in to $REGISTRY_HOST as $REGISTRY_USER"
echo "$REGISTRY_TOKEN" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin >/dev/null
else
log_warn "No REGISTRY_USER / REGISTRY_TOKEN — assuming pre-authenticated docker"
fi
log_info "Pulling $IMAGE"
docker pull "$IMAGE"
# Surface the digest for the deploy log; the operator can reference it later.
DIGEST="$(docker image inspect "$IMAGE" --format '{{ index .RepoDigests 0 }}' 2>/dev/null || true)"
if [[ -n "$DIGEST" ]]; then
log_info "Pulled digest: $DIGEST"
else
log_warn "Could not resolve digest for $IMAGE (image may not have a registry digest yet)"
fi