Skip to content

Commit

Permalink
yolo docker-registry for @blade
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Mar 28, 2024
1 parent ab1512e commit edffa50
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions services-available/docker-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: '3'

networks:
traefik:
external: true

# description: <= put a brief description of docker-registry here =>
# <================= add links to dockerhub or github repo here =================>
# <================= add links to other related documentation here =================>

services:
docker-registry:
image: registry:${DOCKER_REGISTRY_DOCKER_TAG:-2}
container_name: ${DOCKER_REGISTRY_CONTAINER_NAME:-docker-registry}
restart: ${DOCKER_REGISTRY_RESTART:-unless-stopped}
networks:
- traefik
volumes:
- ./media/docker-registry:/var/lib/registry
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- REGISTRY_STORAGE_DELETE_ENABLED=${DOCKER_REGISTRY_STORAGE_DELETE_ENABLED:-true}
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=${DOCKER_REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY:-/var/lib/registry}
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- TZ=${TZ}
labels:
- joyride.host.name=${DOCKER_REGISTRY_CONTAINER_NAME:-registry}.${HOST_DOMAIN}
- traefik.enable=${DOCKER_REGISTRY_TRAEFIK_ENABLED:-true}
- traefik.http.routers.registry.entrypoints=websecure
- traefik.http.routers.registry.rule=Host(`${DOCKER_REGISTRY_CONTAINER_NAME:-registry}.${HOST_DOMAIN}`)
- traefik.http.services.registry.loadbalancer.server.port=5000
# https://bcrypt-generator.com/ Generate DOCKER_REGISTRY_AUTH_PASS - make sure you double up the $$ to escape them
- traefik.http.middlewares.auth.basicauth.users=${DOCKER_REGISTRY_AUTH_USER:-admin}:${DOCKER_REGISTRY_AUTH_PASS:-password}}
- com.centurylinklabs.watchtower.enable=${DOCKER_REGISTRY_WATCHTOWER_ENABLED:-true}
- autoheal=${DOCKER_REGISTRY_AUTOHEAL_ENABLED:-true}

0 comments on commit edffa50

Please sign in to comment.