Refactor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-05 22:44:28 +02:00
parent 86e52be5e1
commit 5a8416fcdf
113 changed files with 456 additions and 649 deletions

View File

@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=registry

View File

@ -0,0 +1,30 @@
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
delete:
enabled: true
auth:
htpasswd:
realm: Registry Realm
path: /auth/htpasswd
http:
addr: :5000
headers:
Access-Control-Expose-Headers: ['Docker-Content-Digest']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Origin: ['https://registry-ui.tobiasmanske.de']
Access-Control-Allow-Credentials: [true]
Access-Control-Allow-Headers: ['Authorization', 'Accept']
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3

View File

@ -0,0 +1,48 @@
---
services:
registry:
container_name: registry
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.registry.rule=Host(`registry.tobiasmanske.de`)"
- "traefik.http.routers.registry.entryPoints=websecure"
- "traefik.http.services.registry.loadbalancer.server.port=5000"
image: 'registry:2'
networks:
- gateway
- backend
volumes:
- registry_data:/var/lib/registry
- ./htpasswd:/auth/htpasswd:ro,z
- ./config.yaml:/etc/docker/registry/config.yml:ro,z
frontend:
image: joxit/docker-registry-ui:latest
restart: unless-stopped
depends_on:
- registry
environment:
- DELETE_IMAGES=true
- REGISTRY_TITLE=My Private Docker Registry
- NGINX_PROXY_PASS_URL=http://registry:5000
- SINGLE_REGISTRY=true
labels:
- "traefik.enable=true"
- "traefik.http.routers.registryui.rule=Host(`registry-ui.tobiasmanske.de`)"
- "traefik.http.routers.registryui.entryPoints=websecure"
- "traefik.http.services.registryui.loadbalancer.server.port=80"
networks:
- gateway
- backend
volumes:
registry_data:
networks:
gateway:
external: true
backend:
internal: true
...

View File

@ -0,0 +1,3 @@
{% for line in registry.HTPASSWD %}
{{ line }}
{% endfor %}