version: "3.9"

services:
  rtr-debug-client:
    build:
      context: ../..
      dockerfile: deploy/client/Dockerfile
    image: rpki-rtr-debug-client:latest
    command:
      [
        "${RPKI_RTR_SERVER_ADDR:-rpki-rtr-ssh:22}",
        "${RPKI_RTR_PROTOCOL_VERSION:-2}",
        "reset",
        "--ssh",
        "--ssh-user",
        "${RPKI_RTR_SSH_USERNAME:-rpki-rtr}",
        "--ssh-password",
        "${RPKI_RTR_SSH_PASSWORD}",
        "--ssh-server-key",
        "${RPKI_RTR_SSH_SERVER_PUBKEY_PATH:-/app/certs/ssh_host_rsa_key.pub}",
        "--keep-after-error",
        "--summary-only"
      ]
    volumes:
      - ${RPKI_RTR_CLIENT_KEYS_VOLUME:-../../certs:/app/certs:ro}
      - ${RPKI_RTR_CLIENT_LOG_HOST_DIR:-../../logs/client}:/app/logs
    restart: no
    stdin_open: true
    tty: true
    networks:
      - rpki_net

networks:
  rpki_net:
    name: rpki_net
    driver: bridge
