From 04b8537c963212cb4023cfb418ce6945e747a1ed Mon Sep 17 00:00:00 2001 From: continuist Date: Sun, 29 Jun 2025 01:49:13 -0400 Subject: [PATCH] Remove unneeded file and clean up references --- registry/README.md | 1 - registry/docker-compose.yml | 1 - registry/registry-config.yml | 20 -------------------- scripts/cleanup.sh | 18 +++++++++--------- 4 files changed, 9 insertions(+), 31 deletions(-) delete mode 100644 registry/registry-config.yml diff --git a/registry/README.md b/registry/README.md index f7092b8..42886a8 100644 --- a/registry/README.md +++ b/registry/README.md @@ -5,7 +5,6 @@ This folder contains the configuration files for the Harbor Registry setup used ## Files - `docker-compose.yml` - Docker Compose configuration for Harbor services -- `nginx.conf` - Nginx reverse proxy configuration for SSL termination and routing - `harbor.yml` - Harbor configuration file - `README.md` - This file diff --git a/registry/docker-compose.yml b/registry/docker-compose.yml index 7bc2e36..a15ffa4 100644 --- a/registry/docker-compose.yml +++ b/registry/docker-compose.yml @@ -57,7 +57,6 @@ services: - REGISTRY_STORAGE_FILESYSTEM_MAXTHREADS=100 volumes: - harbor_registry:/storage - - ./registry-config.yml:/etc/registry/config.yml:ro networks: - harbor diff --git a/registry/registry-config.yml b/registry/registry-config.yml deleted file mode 100644 index a05fba7..0000000 --- a/registry/registry-config.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 0.1 -log: - level: info -storage: - filesystem: - rootdirectory: /storage - delete: - enabled: true - cache: - blobdescriptor: inmemory -http: - addr: :5000 - headers: - X-Content-Type-Options: [nosniff] - X-Frame-Options: [DENY] - X-XSS-Protection: [1; mode=block] -auth: - htpasswd: - realm: basic-realm - path: /etc/registry/auth/htpasswd \ No newline at end of file diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index c092b93..509fce5 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -91,7 +91,7 @@ cleanup_registry() { return fi - log_info "Cleaning up registry images..." + log_info "Cleaning up Harbor registry..." if [ ! -d "$REGISTRY_DIR" ]; then log_warning "Registry directory not found: $REGISTRY_DIR" @@ -100,24 +100,24 @@ cleanup_registry() { if [ "$DRY_RUN" = "true" ]; then log_warning "DRY RUN MODE - No changes will be made" - echo "Would run: cd $REGISTRY_DIR && docker-compose exec registry registry garbage-collect /etc/docker/registry/config.yml" + echo "Would run: cd $REGISTRY_DIR && docker-compose exec harbor-registry registry garbage-collect" return fi # Change to registry directory cd "$REGISTRY_DIR" - # Check if registry is running - if ! docker-compose ps | grep -q "registry.*Up"; then - log_warning "Registry is not running, skipping registry cleanup" + # Check if Harbor is running + if ! docker-compose ps | grep -q "harbor-registry.*Up"; then + log_warning "Harbor registry is not running, skipping registry cleanup" return fi - # Run registry garbage collection (keep last 10 tags per repository) - log_info "Running registry garbage collection..." - docker-compose exec -T registry registry garbage-collect /etc/docker/registry/config.yml + # Run Harbor registry garbage collection + log_info "Running Harbor registry garbage collection..." + docker-compose exec -T harbor-registry registry garbage-collect - log_success "Registry cleanup completed" + log_success "Harbor registry cleanup completed" } cleanup_production() {