services:
  registry:
    image: registry:3.0.0
    container_name: registry
    restart: unless-stopped
    ports:
      - "5000:5000"
    environment:
      REGISTRY_AUTH: htpasswd
      REGISTRY_AUTH_HTPASSWD_REALM: "Registry Realm"
      REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
      REGISTRY_STORAGE_DELETE_ENABLED: true
    volumes:
      - ./registry/data:/var/lib/registry
      - ./registry/auth:/auth

  registry-browser:
    image: klausmeyer/docker-registry-browser:1.9.0
    container_name: registry-browser
    restart: unless-stopped
    ports:
      - "8081:8080"
    environment:
      SECRET_KEY_BASE: "b8464de925141ff42cf99c702e1ff54f1997edc2761a7236a981954e0c2cd7f95bf00c77647f234e393db16b039e9ed6afc41c44ddae2d8745458c19c4ff1aa1"
      ENABLE_DELETE_IMAGES: true
      DOCKER_REGISTRY_URL: http://192.168.31.10:5000
      SCRIPT_NAME: "/browser"
      RAILS_RELATIVE_URL_ROOT: "/browser"