2022-09-22 07:50:00 +02:00
|
|
|
version: "3.3"
|
|
|
|
services:
|
|
|
|
mail:
|
|
|
|
image: bytemark/smtp
|
|
|
|
restart: always
|
2022-09-22 09:43:03 +02:00
|
|
|
env_file:
|
|
|
|
- {{ plausible_volume_config }}/env.mail.conf
|
2022-09-22 07:50:00 +02:00
|
|
|
networks:
|
|
|
|
- plausible
|
|
|
|
|
|
|
|
plausible_db:
|
|
|
|
image: postgres:12
|
|
|
|
restart: always
|
|
|
|
volumes:
|
2022-09-22 09:43:03 +02:00
|
|
|
- {{ plausible_volume_db }}:/var/lib/postgresql/data
|
2022-09-23 12:50:15 +02:00
|
|
|
{% if plausible_db_port %}
|
|
|
|
ports:
|
|
|
|
- {{ plausible_db_port }}:5432
|
|
|
|
{% endif %}
|
|
|
|
env_file:
|
|
|
|
- {{ plausible_volume_config }}/env.db.conf
|
2022-09-22 07:50:00 +02:00
|
|
|
networks:
|
|
|
|
- plausible
|
|
|
|
|
|
|
|
plausible_events_db:
|
|
|
|
image: clickhouse/clickhouse-server:22.6-alpine
|
|
|
|
restart: always
|
|
|
|
volumes:
|
2022-09-22 09:43:03 +02:00
|
|
|
- {{ plausible_volume_events }}:/var/lib/clickhouse
|
|
|
|
- {{ plausible_volume_config }}/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
|
|
|
|
- {{ plausible_volume_config }}/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
|
2022-09-22 07:50:00 +02:00
|
|
|
ulimits:
|
|
|
|
nofile:
|
|
|
|
soft: 262144
|
|
|
|
hard: 262144
|
|
|
|
networks:
|
|
|
|
- plausible
|
|
|
|
|
|
|
|
plausible:
|
|
|
|
image: plausible/analytics:latest
|
|
|
|
restart: always
|
|
|
|
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
|
|
|
|
depends_on:
|
|
|
|
- plausible_db
|
|
|
|
- plausible_events_db
|
|
|
|
- mail
|
|
|
|
ports:
|
|
|
|
- {{ plausible_port }}:8000
|
|
|
|
env_file:
|
2022-09-22 09:43:03 +02:00
|
|
|
- {{ plausible_volume_config }}/env.plausible.conf
|
2022-09-23 12:50:15 +02:00
|
|
|
{% if plausible_volume_geoip and plausible_geoip_db and plausible_geoip_stat.stat.exists %}
|
2022-09-22 07:50:00 +02:00
|
|
|
volumes:
|
2022-09-22 11:34:33 +02:00
|
|
|
- {{ plausible_volume_geoip }}/{{ plausible_geoip_db }}:/geoip:ro
|
2022-09-22 09:43:03 +02:00
|
|
|
{% else %}
|
|
|
|
# No GeoIP data volume
|
|
|
|
{% endif%}
|
2022-09-22 07:50:00 +02:00
|
|
|
networks:
|
|
|
|
- plausible
|
|
|
|
|
|
|
|
networks:
|
|
|
|
plausible: {}
|