#
# Docker compose file that launches LogViewer, sending output to a remote X11
# display.
#
# Defines:
#   - logviewer: container running LogViewer
#
# Requires:
#   - tango.yml
#
version: '2'

services:
  logviewer:
    image: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-java:latest
    container_name: ${CONTAINER_NAME_PREFIX}logviewer
    network_mode: ${NETWORK_MODE}
    volumes:
      - ${XAUTHORITY_MOUNT}
    environment:
      - XAUTHORITY=${XAUTHORITY}
      - DISPLAY=${DISPLAY}
      - TANGO_HOST=${TANGO_HOST}
    entrypoint:
      - /usr/local/bin/wait-for-it.sh
      - ${TANGO_HOST}
      - --timeout=30
      - --strict
      - --
      - /usr/local/bin/logviewer
