Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '2'
services:
elasticsearch:
container_name: elasticsearch
image: elasticsearch:2.3
restart: unless-stopped
networks:
- logging
expose:
- 9200
- 9300
logstash:
container_name: logstash
image: logstash:2.3
restart: unless-stopped
networks:
- logging
expose:
- "12201/udp"
depends_on:
- elasticsearch
command: logstash -e 'input { gelf { type => docker port => 12201 } } output { elasticsearch { hosts => ["elasticsearch:9200"] } }'
kibana:
image: kibana:4.5
restart: unless-stopped
networks:
- logging
ports:
- "5601:5601"
depends_on:
- elasticsearch
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
nginx:
image: nginx:1.9
restart: unless-stopped
networks:
- logging
ports:
- "80:80"
logging:
driver: gelf
options:
gelf-address: "udp://localhost:12201"
depends_on:
- logstash
networks:
logging: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.