#
# Docker compose file that launches an interactive iTango session.
#
# Connect to the interactive session with 'docker attach itango'.
# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q>
#
# Defines:
#   - itango: iTango interactive session
#
# Requires:
#   - lofar-device-base.yml
#
version: '2'

services:
  device-sdp:
    image: lofar-device-base
    container_name: ${CONTAINER_NAME_PREFIX}device-sdp
    network_mode: ${NETWORK_MODE}
    volumes:
        - ${TANGO_LOFAR_CONTAINER_MOUNT}
    environment:
      - TANGO_HOST=${TANGO_HOST}
    entrypoint:
      - /usr/local/bin/wait-for-it.sh
      - ${TANGO_HOST}
      - --timeout=30
      - --strict
      - --
      - python3 -u ${TANGO_LOFAR_CONTAINER_DIR}/devices/SDP.py LTS -v
    restart: on-failure
