Remove unneeded file and clean up references
Some checks are pending
Some checks are pending
This commit is contained in:
parent
ce85fde17a
commit
04b8537c96
4 changed files with 9 additions and 31 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ services:
|
|||
- REGISTRY_STORAGE_FILESYSTEM_MAXTHREADS=100
|
||||
volumes:
|
||||
- harbor_registry:/storage
|
||||
- ./registry-config.yml:/etc/registry/config.yml:ro
|
||||
networks:
|
||||
- harbor
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue