diff --git a/docker-compose.yml b/docker-compose.yml index 368bed9c0..a7c68535b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,18 +3,16 @@ # You can adjust the settings as-per your environment version: "3.3" services: - -# 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 + # 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 fake_smtp: image: mailhog/mailhog:v1.0.0 ports: - - 1025:1025 - - 8025:8025 + - 1025:1025 + - 8025:8025 healthcheck: test: echo | telnet 127.0.0.1 1025 - plausible_db: image: postgres:12 command: ["postgres", "-c", "log_statement=all", "-c", "log_destination=stderr"] @@ -32,7 +30,20 @@ services: volumes: - event-data:/var/lib/clickhouse 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= + - GEOIPUPDATE_LICENSE_KEY= + - GEOIPUPDATE_EDITION_IDS=GeoLite2-Country + # update every 7 days + - GEOIPUPDATE_FREQUENCY=168 + volumes: + - geoip:/usr/share/GeoIP plausible: build: @@ -49,10 +60,12 @@ services: - plausible_db - plausible_events_db - fake_smtp + # only if you use the geioip container + volumes: + - geoip:/geoip:ro env_file: - plausible-variables.sample.env - setup: build: context: . @@ -65,11 +78,12 @@ services: - plausible_db - plausible_events_db env_file: - - plausible-variables.sample.env - + - plausible-variables.sample.env volumes: db-data: driver: local event-data: driver: local + geoip: + driver: local diff --git a/plausible-variables.sample.env b/plausible-variables.sample.env index 4248f0ada..5672919a4 100644 --- a/plausible-variables.sample.env +++ b/plausible-variables.sample.env @@ -22,3 +22,4 @@ CLICKHOUSE_DATABASE_USER=default CLICKHOUSE_DATABASE_PASSWORD= DISABLE_AUTH=false DISABLE_REGISTRATION=false +GEOLITE2_COUNTRY_DB=/geoip/GeoLite2-Country.mmdb