Specify geoip file.

This commit is contained in:
Laur Ivan 2022-09-22 11:34:33 +02:00
parent 5829f66490
commit d970ae0683
5 changed files with 9 additions and 3 deletions

3
TODO.md Normal file
View File

@ -0,0 +1,3 @@
# Roadmap
- [ ] Allow external postgres instance

View File

@ -29,3 +29,6 @@ plausible_volume_config: "{{ plausible_volume_base }}/config"
plausible_volume_db: "{{ plausible_volume_base }}/db_data"
plausible_volume_events: "{{ plausible_volume_base }}/event_data"
plausible_volume_geoip: "{{ plausible_volume_base }}/geoip_data"
# GeoIP
plausible_geoip_db: "GeoLite2-Country.mmdb"

View File

@ -4,7 +4,7 @@
# Check if geoip volume exists
- name: Check if geoip volume exists
ansible.builtin.stat:
path: "{{ plausible_volume_geoip }}/GeoLite2-Country.mmdb"
path: "{{ plausible_volume_geoip }}/{{ plausible_geoip_db }}"
register: plausible_geoip_stat
- name: Set up directories

View File

@ -46,7 +46,7 @@ services:
- {{ plausible_volume_config }}/env.plausible.conf
{% if plausible_geoip_stat.stat.exists %}
volumes:
- {{ plausible_volume_geoip }}/GeoLite2-Country.mmdb:/geoip:ro
- {{ plausible_volume_geoip }}/{{ plausible_geoip_db }}:/geoip:ro
{% else %}
# No GeoIP data volume
{% endif%}

View File

@ -5,7 +5,7 @@ BASE_URL={{ plausible_base_url }}
SECRET_KEY_BASE={{ plausible_secret_key_base }}
{% if plausible_geoip_stat.stat.exists %}
GEOLITE2_COUNTRY_DB={{ plausible_volume_geoip }}/GeoLite2-Country.mmdb
GEOLITE2_COUNTRY_DB={{ plausible_volume_geoip }}/{{ plausible_geoip_db }}
{% endif %}
# DB and events