1
compose/01_registry/.env
Normal file
1
compose/01_registry/.env
Normal file
@ -0,0 +1 @@
|
||||
COMPOSE_PROJECT_NAME=registry
|
29
compose/01_registry/docker-compose.yml
Normal file
29
compose/01_registry/docker-compose.yml
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
services:
|
||||
registry:
|
||||
container_name: registry
|
||||
restart: always
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.scope=update"
|
||||
- "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
|
||||
environment:
|
||||
REGISTRY_AUTH: htpasswd
|
||||
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
|
||||
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
|
||||
volumes:
|
||||
- registry_data:/var/lib/registry
|
||||
- ./htpasswd:/auth/htpasswd:ro,z
|
||||
|
||||
volumes:
|
||||
registry_data:
|
||||
|
||||
networks:
|
||||
gateway:
|
||||
external: true
|
||||
...
|
3
compose/01_registry/htpasswd
Normal file
3
compose/01_registry/htpasswd
Normal file
@ -0,0 +1,3 @@
|
||||
{% for line in registry.HTPASSWD %}
|
||||
{{ line }}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user