-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |