version: '2'

services:
  registry-srv:
    image: registry:2.7
    restart: always
    volumes:
      - storage:/var/lib/registry
      - ./config.yml:/etc/docker/registry/config.yml:ro
    networks:
      - registry-ui-net
    container_name: registry-srv

  registry-ui:
    image: joxit/docker-registry-ui:latest
    restart: always
    ports:
      - 8080:80
    environment:
      - REGISTRY_TITLE=Private Docker Registry
      - NGINX_PROXY_PASS_URL=http://registry-srv:5000
      - DELETE_IMAGES=true
      - SINGLE_REGISTRY=true
    networks:
      - registry-ui-net
    container_name: registry-ui

networks:
    registry-ui-net:

volumes:
    storage:
      driver: local
