version: '3.1' services: # ELK elasticsearch: image: elasticsearch:5.6.4-alpine kibana: image: kibana:5.6.4 links: - elasticsearch ports: - 5601:5601 environment: - ELASTICSEARCH_URL=http://elasticsearch:9200 logstash: image: logstash:5.6.4-alpine command: "-e \"input { gelf { } } filter { } output { elasticsearch { hosts => ['elasticsearch:9200'] index => 'logstash-%{+YYYY.MM.dd}' } }\"" links: - elasticsearch ports: - 12201:12201/udp # Our services rest: image: test/rest:stable command: /code/bin/app.js hostname: rest restart: always logging: driver: gelf options: gelf-address: "udp://127.0.0.1:12201"