Files
server_cloud_ladkau_de/ansible/roles/registry/templates/docker-compose.yml.j2
T
ml b15754ba2f Harden against bot floods and add post-provisioning service check
- Traefik rate-limits all routes (60 req/min standard, 300 for Nextcloud)
  and writes access logs to /var/log/traefik/access.log
- Fail2ban watches Traefik access logs and bans IPs after 10 x 403/404
  within 60 s for 24 h
- Nextcloud html directory created as www-data (UID 33) so Apache can
  process .htaccess and serve requests correctly
- scripts/check-services.sh verifies all seven endpoints return the
  expected HTTP status after provisioning
2026-06-28 08:02:45 +02:00

30 lines
1.1 KiB
Django/Jinja

# Managed by Ansible — do not edit manually
services:
registry:
image: registry:2
container_name: registry
restart: unless-stopped
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Container Registry
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
REGISTRY_STORAGE_DELETE_ENABLED: "true"
volumes:
- {{ registry_data_dir }}/data:/var/lib/registry
- {{ registry_data_dir }}/auth:/auth:ro
networks:
- traefik_public
labels:
- "traefik.enable=true"
- "traefik.http.routers.registry.rule=Host(`{{ domain_registry }}`)"
- "traefik.http.routers.registry.entrypoints=websecure"
- "traefik.http.routers.registry.tls.certresolver=letsencrypt"
- "traefik.http.services.registry.loadbalancer.server.port=5000"
- "traefik.http.routers.registry.middlewares=registry-buffering,rate-limit@docker"
# Remove body size limit so large image layers can be pushed
- "traefik.http.middlewares.registry-buffering.buffering.maxRequestBodyBytes=0"
networks:
traefik_public:
external: true