compose/registry/compose.yaml

36 lines
969 B
YAML
Raw Normal View History

2023-03-09 22:10:22 +01:00
services:
registry:
image: registry:2.8
container_name: registry
restart: unless-stopped
networks:
- traefik_proxy
configs:
- source: registry
target: /etc/docker/registry/config.yml
mode: 0400
volumes:
- registry_registry:/var/lib/registry
expose:
- 5000
labels:
- "traefik.enable=true"
- "traefik.http.routers.registry.entrypoints=https"
- "traefik.http.routers.registry.rule=Host(`docker.fanyx.xyz`)"
- "traefik.http.middlewares.headers.Headers.sslProxyHeaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.headers.Headers.hostsProxyHeaders=X-Forwarded-Host"
- "traefik.http.middlewares.auth.BasicAuth.usersfile=/htpasswd"
- "traefik.http.routers.registry.middlewares=headers@docker,auth@docker"
volumes:
registry_registry:
external: true
configs:
registry:
file: ./config.yml
networks:
traefik_proxy:
name: traefik_proxy