Skip to content

Instantly share code, notes, and snippets.

@etoews
Created April 29, 2016 19:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etoews/98d5366c2fd9fca809a1ef64fa81a51a to your computer and use it in GitHub Desktop.
Save etoews/98d5366c2fd9fca809a1ef64fa81a51a to your computer and use it in GitHub Desktop.
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