services:
  cassandra:
    image: cassandra:5
    environment:
      JVM_OPTS: "-Xms750m -Xmx750m"
      CASSANDRA_CLUSTER_NAME: "dd-trace-go-test-cluster"
      CASSANDRA_DC: "dd-trace-go-test-datacenter"
      CASSANDRA_ENDPOINT_SNITCH: "GossipingPropertyFileSnitch"
    ports:
      - "9042:9042"
  mysql:
    image: mysql:8
    environment:
      MYSQL_ROOT_PASSWORD: admin
      MYSQL_PASSWORD: test
      MYSQL_USER: test
      MYSQL_DATABASE: test
    ports:
      - "3306:3306"
  postgres:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: postgres
      POSTGRES_USER: postgres
      POSTGRES_DB: postgres
    ports:
      - "5432:5432"
  mssql:
    image: mcr.microsoft.com/mssql/server:2019-latest
    environment:
      SA_PASSWORD: myPassw0rd
      ACCEPT_EULA: Y
    ports:
      - "1433:1433"
  consul:
    image: consul:1.15
    ports:
      - "8500:8500"
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
  valkey:
    image: valkey/valkey:8
    environment:
      VALKEY_EXTRA_FLAGS: "--port 6380 --requirepass password-for-default"
    ports:
      - "6380:6380"
  elasticsearch2:
    image: elasticsearch:2
    environment:
      ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
    ports:
      - "9200:9200"
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
  elasticsearch5:
    image: elasticsearch:5
    environment:
      ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
    ports:
      - "9201:9200"
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
  elasticsearch6:
    image: elasticsearch:6.8.23
    environment:
      http.port: 9202-9300
      discovery.type: single-node
      ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
    ports:
      - "9202:9202"
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
  elasticsearch7:
    image: elasticsearch:7.17.28
    environment:
      http.port: 9203-9300
      discovery.type: single-node
      ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
    ports:
      - "9203:9203"
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
  elasticsearch8:
    image: elasticsearch:8.18.1
    environment:
      http.port: 9204-9300
      discovery.type: single-node
      xpack.security.enabled: "false"
      ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
    ports:
      - "9204:9204"
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
  datadog-agent:
    image: gcr.io/datadoghq/agent:latest
    environment:
      DD_APM_ENABLED: "true"
      DD_BIND_HOST: "0.0.0.0"
      DD_API_KEY: invalid_key_but_this_is_fine
    ports:
      - "8126:8126"
  testagent:
    image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.23.1
    environment:
      LOG_LEVEL: DEBUG
      TRACE_LANGUAGE: golang
      ENABLED_CHECKS: trace_stall,trace_count_header,trace_peer_service,trace_dd_service
      PORT: 9126
      DD_SUPPRESS_TRACE_PARSE_ERRORS: "true"
      DD_POOL_TRACE_CHECK_FAILURES: "true"
      DD_DISABLE_ERROR_RESPONSES: "true"
    ports:
      - "127.0.0.1:9126:9126"
  mongodb3:
    image: mongo:3
    ports:
      - "27018:27017"
  mongodb:
    image: mongo:8
    ports:
      - "27017:27017"
  memcached:
    image: memcached:1.6-alpine
    ports:
      - "11211:11211"
  kafka:
    image: confluentinc/confluent-local:7.5.0
    container_name: kafka
    environment:
      KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9093,BROKER://0.0.0.0:9092,CONTROLLER://0.0.0.0:9094"
      KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9093,BROKER://localhost:9092"
      KAFKA_REST_BOOTSTRAP_SERVERS: "PLAINTEXT://0.0.0.0:9093,BROKER://0.0.0.0:9092"
      KAFKA_CONTROLLER_QUORUM_VOTERS: "1@localhost:9094"
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "BROKER:PLAINTEXT,PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"
      KAFKA_INTER_BROKER_LISTENER_NAME: "BROKER"
      KAFKA_BROKER_ID: "1"
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
      KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: "1"
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1"
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1"
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: "0"
      KAFKA_NODE_ID: "1"
      KAFKA_PROCESS_ROLES: "broker,controller"
      KAFKA_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
    ports:
      - "9092:9092"
      - "9093:9093"
  localstack:
    image: localstack/localstack:latest
    ports:
      - "4566:4566"
