Running logstash with docker compose

I figured it out. My final yaml is:

version: "3"
services:
  elasticsearch:
    image: elasticsearch
    ports: 
    - "9200:9200"
    - "9300:9300"
  kibana:
    image: kibana
    ports:
    - "5601:5601"
    links:
    - elasticsearch
    depends_on:
    - elasticsearch
  logstash:
    image: logstash
    links:
    - elasticsearch
    volumes:
    - ./:/config-dir
    command: logstash -f /config-dir/logstash.conf
    depends_on:
    - elasticsearch

The command line is what I needed to add.