Skip to content

Commit

Permalink
Update elastic search with env
Browse files Browse the repository at this point in the history
  • Loading branch information
ledongthuc committed Dec 21, 2020
1 parent 2bb01f8 commit b377b68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions elasticsearch/elk_aws_elasticsearch/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
LOGGING_OPTIONS_MAX_SIZE=500m
LOGGING_OPTIONS_MAX_FILE=10

LOGSTASH_ES_JAVA_OPTS=-Xmx256m -Xms256m
ELASTICSEARCH_URL=https://search-xxx-yyy.ap-southeast-2.es.amazonaws.com:443/
ELASTICSEARCH_USERNAME=this_is_user_name
Expand Down
12 changes: 10 additions & 2 deletions elasticsearch/elk_aws_elasticsearch/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
version: '2'

x-logging-gelf: &logging-gelf
x-logging-application: &logging-application
logging:
driver: gelf
options:
gelf-address: udp://localhost:12201
tag: "application-data"

# USE for develop
# x-logging-application: &logging-defaults
# logging:
# driver: json-file
# options:
# max-size: ${LOGGING_OPTIONS_MAX_SIZE}
# max-file: ${LOGGING_OPTIONS_MAX_FILE}

services:
web:
<<: *logging-gelf
<<: *logging-application
image: httpd
links:
- logstash
Expand Down

0 comments on commit b377b68

Please sign in to comment.