mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Support GeoIP license number in ELK Dockerfile
This commit is contained in:
parent
d148eeddfb
commit
2a7e3b861f
|
@ -25,12 +25,17 @@ services:
|
|||
- SYS_PTRACE
|
||||
restart: always
|
||||
elk:
|
||||
build: elk
|
||||
build:
|
||||
context: elk
|
||||
args:
|
||||
- MAXMIND_LICENSE
|
||||
ports:
|
||||
- "5601:5601"
|
||||
- "9200:9200"
|
||||
- "5044:5044"
|
||||
- "5000:5000"
|
||||
env_file:
|
||||
- elk/.env
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
|
|
1
elk/.env.dist
Normal file
1
elk/.env.dist
Normal file
|
@ -0,0 +1 @@
|
|||
MAXMIND_LICENSE=
|
|
@ -10,15 +10,18 @@ COPY 16-amavis.conf /etc/logstash/conf.d
|
|||
# dovecot grok and filter
|
||||
RUN curl -L https://raw.githubusercontent.com/ninech/logstash-patterns/master/patterns.d/dovecot.grok > /etc/logstash/patterns.d/dovecot.grok
|
||||
RUN curl -L https://raw.githubusercontent.com/ninech/logstash-patterns/master/exmples/50-filter-dovecot.conf > /etc/logstash/conf.d/17-filter-dovecot.conf
|
||||
# FIXME: may be a cron job?
|
||||
# FIXME: may be a cron job?
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
ARG MAXMIND_LICENSE
|
||||
RUN mkdir -p /usr/share/GeoIP && \
|
||||
curl -L http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz | gunzip -c - > /usr/share/GeoIP/GeoLiteCity.dat
|
||||
curl -L "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=${MAXMIND_LICENSE}&suffix=tar.gz" \
|
||||
| tar zx --to-stdout --wildcards --no-anchored '*.mmdb' > /usr/share/GeoIP/GeoLiteCity.dat
|
||||
|
||||
WORKDIR ${LOGSTASH_HOME}
|
||||
RUN gosu logstash bin/logstash-plugin install --local --no-verify logstash-filter-geoip
|
||||
|
||||
# override beats input
|
||||
# override beats input
|
||||
COPY 02-beats-input.conf /etc/logstash/conf.d/
|
||||
# override syslog
|
||||
COPY 10-syslog.conf /etc/logstash/conf.d/
|
||||
|
|
16
elk/docker-compose.yml.dist
Normal file
16
elk/docker-compose.yml.dist
Normal file
|
@ -0,0 +1,16 @@
|
|||
version: '2'
|
||||
|
||||
services:
|
||||
elk:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- MAXMIND_LICENSE
|
||||
ports:
|
||||
- "5601:5601"
|
||||
- "9200:9200"
|
||||
- "5044:5044"
|
||||
- "5000:5000"
|
||||
env_file:
|
||||
- .env
|
||||
restart: always
|
Loading…
Reference in a new issue