Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |