version: '2.4'
services:
  keycloak:
    image: jboss/keycloak
    environment:
      KEYCLOAK_USER: admin
      KEYCLOAK_PASSWORD: password
    user: root
    volumes:
      - ./data/keycloak:/opt/jboss/keycloak/standalone/data/
    networks:
      - registry-ui-net
    command: -Dkeycloak.profile.feature.docker=enabled -b 0.0.0.0

  proxy:
    image: nginx:alpine
    ports:
      - 80:80
    volumes:
      - ./conf/proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
    networks:
      - registry-ui-net

  ui:
    image: joxit/docker-registry-ui
    environment:
      REGISTRY_TITLE: My Private Docker Registry
      REGISTRY_URL: http://localhost
      SINGLE_REGISTRY: 'true'
    networks:
      - registry-ui-net

  registry:
    image: registry:2.7
    volumes:
      - ./conf/registry/:/etc/docker/registry/
      - ./data/registry:/var/lib/registry
    networks:
      - registry-ui-net
networks:
  registry-ui-net:
