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-tls:324}",
        "${RPKI_RTR_PROTOCOL_VERSION:-2}",
        "reset",
        "--tls",
        "--ca-cert",
        "${RPKI_RTR_TLS_CA_CERT_PATH:-/app/certs/client-ca.crt}",
        "--server-name",
        "${RPKI_RTR_TLS_SERVER_NAME:-localhost}",
        "--client-cert",
        "${RPKI_RTR_TLS_CLIENT_CERT_PATH:-/app/certs/client-good.crt}",
        "--client-key",
        "${RPKI_RTR_TLS_CLIENT_KEY_PATH:-/app/certs/client-good.key}",
        "--keep-after-error",
        "--summary-only"
      ]
    volumes:
      - ${RPKI_RTR_TLS_CERTS_HOST_DIR:-../../tests/fixtures/tls}:/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
