added maxmindinc/geoipupdate container to automatically setup a geoip database

pull/249/head^2
samuel-p 6 years ago
parent 1c2d96e81e
commit b023ba8b06

@ -3,18 +3,16 @@
# You can adjust the settings as-per your environment # You can adjust the settings as-per your environment
version: "3.3" version: "3.3"
services: services:
# As it says, this service is a fake smtp server which accepts SMTP connections
# As it says, this service is a fake smtp server which accepts SMTP connections # the inbox is available at localhost:8025, in actuality, you need to use a proper smtp server
# the inbox is available at localhost:8025, in actuality, you need to use a proper smtp server
fake_smtp: fake_smtp:
image: mailhog/mailhog:v1.0.0 image: mailhog/mailhog:v1.0.0
ports: ports:
- 1025:1025 - 1025:1025
- 8025:8025 - 8025:8025
healthcheck: healthcheck:
test: echo | telnet 127.0.0.1 1025 test: echo | telnet 127.0.0.1 1025
plausible_db: plausible_db:
image: postgres:12 image: postgres:12
command: ["postgres", "-c", "log_statement=all", "-c", "log_destination=stderr"] command: ["postgres", "-c", "log_statement=all", "-c", "log_destination=stderr"]
@ -32,7 +30,20 @@ services:
volumes: volumes:
- event-data:/var/lib/clickhouse - event-data:/var/lib/clickhouse
ports: ports:
- 8123:8123 - 8123:8123
# optional, if you want to setup a geoip database and let it update automatically
# this requires an account at maxmind.com (https://www.maxmind.com/en/geolite2/signup)
geoip:
image: maxmindinc/geoipupdate
environment:
- GEOIPUPDATE_ACCOUNT_ID=<your-account-id>
- GEOIPUPDATE_LICENSE_KEY=<your-license-key>
- GEOIPUPDATE_EDITION_IDS=GeoLite2-Country
# update every 7 days
- GEOIPUPDATE_FREQUENCY=168
volumes:
- geoip:/usr/share/GeoIP
plausible: plausible:
build: build:
@ -49,10 +60,12 @@ services:
- plausible_db - plausible_db
- plausible_events_db - plausible_events_db
- fake_smtp - fake_smtp
# only if you use the geioip container
volumes:
- geoip:/geoip:ro
env_file: env_file:
- plausible-variables.sample.env - plausible-variables.sample.env
setup: setup:
build: build:
context: . context: .
@ -65,11 +78,12 @@ services:
- plausible_db - plausible_db
- plausible_events_db - plausible_events_db
env_file: env_file:
- plausible-variables.sample.env - plausible-variables.sample.env
volumes: volumes:
db-data: db-data:
driver: local driver: local
event-data: event-data:
driver: local driver: local
geoip:
driver: local

@ -22,3 +22,4 @@ CLICKHOUSE_DATABASE_USER=default
CLICKHOUSE_DATABASE_PASSWORD= CLICKHOUSE_DATABASE_PASSWORD=
DISABLE_AUTH=false DISABLE_AUTH=false
DISABLE_REGISTRATION=false DISABLE_REGISTRATION=false
GEOLITE2_COUNTRY_DB=/geoip/GeoLite2-Country.mmdb

Loading…
Cancel
Save