ansible-role-plausible/templates/docker-compose.yml.j2

61 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

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
{% if plausible_db_port %}
ports:
- {{ plausible_db_port }}:5432
{% endif %}
env_file:
- {{ plausible_volume_config }}/env.db.conf
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_volume_geoip and plausible_geoip_db and plausible_geoip_stat.stat.exists %}
volumes:
2022-09-22 11:34:33 +02:00
- {{ plausible_volume_geoip }}/{{ plausible_geoip_db }}:/geoip:ro
{% else %}
# No GeoIP data volume
{% endif%}
networks:
- plausible
networks:
plausible: {}