sharenet/registry/docker-compose.registry.yml
continuist bf41839b8c
Some checks failed
CI/CD Pipeline (Fully Isolated DinD) / Run Tests (DinD) (push) Has been cancelled
CI/CD Pipeline (Fully Isolated DinD) / Build and Push Docker Images (DinD) (push) Has been cancelled
CI/CD Pipeline (Fully Isolated DinD) / Deploy to Production (push) Has been cancelled
Finish making Caddyfile work correctly
2025-08-16 16:25:23 -04:00

31 lines
907 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

services:
registry:
image: registry:2
container_name: registry
restart: unless-stopped
environment:
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry
# Optional but recommended if you want to be able to delete images:
REGISTRY_STORAGE_DELETE_ENABLED: "true"
# Listen only inside the compose network
REGISTRY_HTTP_ADDR: 0.0.0.0:5000
volumes:
- ./registry:/var/lib/registry
expose:
- "5000" # internal only, not published
caddy:
image: caddy:2
container_name: caddy
restart: unless-stopped
depends_on:
- registry
ports:
- "443:443" # HTTPS only
- "4443:4443"
# deliberately no "80:80" no HTTP
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- /etc/registry/certs:/etc/registry/certs:ro
environment:
- REGISTRY_PASSWORD_HASH=${REGISTRY_PASSWORD_HASH}