57 lines
1.5 KiB
Django/Jinja
57 lines
1.5 KiB
Django/Jinja
version: "3.3"
|
|
services:
|
|
mail:
|
|
image: bytemark/smtp
|
|
restart: always
|
|
env_file:
|
|
- {{ plausible_volume_config }}/env.mail.conf
|
|
networks:
|
|
- plausible
|
|
|
|
plausible_db:
|
|
image: postgres:12
|
|
restart: always
|
|
volumes:
|
|
- {{ plausible_volume_db }}:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD={{ plausible_pg_password }}
|
|
networks:
|
|
- plausible
|
|
|
|
plausible_events_db:
|
|
image: clickhouse/clickhouse-server:22.6-alpine
|
|
restart: always
|
|
volumes:
|
|
- {{ 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
|
|
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:
|
|
- {{ plausible_volume_config }}/env.plausible.conf
|
|
{% if plausible_geoip_stat.stat.exists %}
|
|
volumes:
|
|
- {{ plausible_volume_geoip }}/{{ plausible_geoip_db }}:/geoip:ro
|
|
{% else %}
|
|
# No GeoIP data volume
|
|
{% endif%}
|
|
networks:
|
|
- plausible
|
|
|
|
networks:
|
|
plausible: {} |