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

services:
  jive:
    image: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-java:latest
    container_name: ${CONTAINER_NAME_PREFIX}jive
    network_mode: ${NETWORK_MODE}
    volumes:
      - ${XAUTHORITY_MOUNT}
      - ${TANGO_SKA_CONTAINER_MOUNT}
      - ${TANGO_LOFAR_CONTAINER_MOUNT}
      - ${HOME}:/hosthome
    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/jive
