Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
donvito committed Dec 1, 2018
1 parent 944d969 commit 34f0f91
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 0 deletions.
Empty file added README.md
Empty file.
58 changes: 58 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,58 @@
version: "3.3"
services:

elasticsearch:
image: 'docker.elastic.co/elasticsearch/elasticsearch:6.5.1'
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearch-vol:/usr/share/elasticsearch/data
networks:
- logging-net
environment:
- xpack.security.enabled=false

fluentd:
image: melvindave/fluentd-elastic:1.0
ports:
- "24224:24224"
networks:
- logging-net
depends_on:
- "elasticsearch"
volumes:
- ./fluentd/etc:/fluentd/etc

kibana:
image: 'docker.elastic.co/kibana/kibana:6.5.1'
ports:
- "5601:5601"
networks:
- logging-net
depends_on:
- elasticsearch

nginx:
image: nginx
ports:
- "80:80"
networks:
- logging-net
deploy:
replicas: 1
volumes:
- ${NGINX_HTML_DIR}:/usr/share/nginx/html
logging:
driver: fluentd
options:
fluentd-address: localhost:24224
tag: httpd.access
depends_on:
- "fluentd"

networks:
logging-net:

volumes:
elasticsearch-vol:
13 changes: 13 additions & 0 deletions dockerfiles/fluentd-custom/Dockerfile
@@ -0,0 +1,13 @@
FROM fluent/fluentd:latest

# below RUN includes plugin as examples elasticsearch is not required
# you may customize including plugins as you wish

RUN apk add --update --virtual .build-deps \
sudo build-base ruby-dev \
&& sudo gem install \
fluent-plugin-elasticsearch \
&& sudo gem sources --clear-all \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* \
/home/fluent/.gem/ruby/2.3.0/cache/*.gem
24 changes: 24 additions & 0 deletions fluentd/etc/fluent.conf
@@ -0,0 +1,24 @@
<source>
@type forward
port 24224
</source>

<filter **>
@type stdout
</filter>

<match *.**>
@type copy
<store>
@type elasticsearch
host elasticsearch
port 9200
logstash_format true
logstash_prefix fluentd
logstash_dateformat %Y%m%d
include_tag_key true
type_name access_log
tag_key @log_name
flush_interval 1s
</store>
</match>
15 changes: 15 additions & 0 deletions nginx-files/index.html
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>

<h1>Go + Docker rocks!</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

</body>
</html>

0 comments on commit 34f0f91

Please sign in to comment.