Add Docker registry service configuration with htpasswd authentication

This commit is contained in:
Nathan 2026-04-17 15:03:27 -04:00
parent 4553936b53
commit a952f68bdf
2 changed files with 26 additions and 0 deletions

1
.gitignore vendored
View File

@ -45,3 +45,4 @@ logs/
# Local development overrides
docker-compose.override.yml
compose.override.yml
htpasswd

View File

@ -0,0 +1,25 @@
services:
registry:
image: registry:2
restart: always
environment:
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
- REGISTRY_STORAGE_DELETE_ENABLED=true
volumes:
- /mnt/appdata/docker_registry/data:/var/lib/registry
- /mnt/appdata/docker_registry/auth:/auth
networks:
- proxy-net
labels:
- traefik.enable=true
- traefik.http.routers.registry.rule=Host(`registry.castaldifamily.com`)
- traefik.http.routers.registry.entrypoints=websecure
- traefik.http.routers.registry.tls.certresolver=cloudflare
- traefik.http.services.registry.loadbalancer.server.port=5000
networks:
proxy-net:
name: proxy-net
external: true