2023-10-19 09:28:25 +00:00
|
|
|
# ignore: true
|
|
|
|
# documentation: https://plausible.io/docs/self-hosting
|
|
|
|
# slogan: "Plausible Analytics is a simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics."
|
2023-10-24 10:33:49 +00:00
|
|
|
# tags: analytics, privacy, google, alternative
|
2024-03-12 14:09:24 +00:00
|
|
|
# port: 8000
|
2023-10-19 09:28:25 +00:00
|
|
|
|
2023-09-25 10:49:55 +00:00
|
|
|
services:
|
|
|
|
plausible:
|
2024-07-10 11:58:53 +00:00
|
|
|
image: "ghcr.io/plausible/community-edition:v2.1.0"
|
|
|
|
command: 'sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"'
|
2023-09-25 10:49:55 +00:00
|
|
|
environment:
|
2024-07-10 11:58:53 +00:00
|
|
|
- "DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@plausible_db/plausible"
|
|
|
|
- BASE_URL=$SERVICE_FQDN_PLAUSIBLE
|
2023-09-25 10:49:55 +00:00
|
|
|
- SECRET_KEY_BASE=$SERVICE_BASE64_64_PLAUSIBLE
|
2024-07-10 11:58:53 +00:00
|
|
|
- TOTP_VAULT_KEY=$SERVICE_BASE64_TOTP
|
2023-09-25 10:49:55 +00:00
|
|
|
depends_on:
|
|
|
|
- plausible_db
|
|
|
|
- plausible_events_db
|
|
|
|
- mail
|
|
|
|
mail:
|
|
|
|
image: bytemark/smtp
|
|
|
|
|
|
|
|
plausible_db:
|
2024-07-10 11:58:53 +00:00
|
|
|
image: "postgres:14-alpine"
|
2023-09-25 10:49:55 +00:00
|
|
|
volumes:
|
2024-07-10 11:58:53 +00:00
|
|
|
- "db-data:/var/lib/postgresql/data"
|
2023-09-25 10:49:55 +00:00
|
|
|
environment:
|
|
|
|
- POSTGRES_DB=plausible
|
|
|
|
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
|
|
|
|
|
|
|
|
plausible_events_db:
|
2024-07-10 11:58:53 +00:00
|
|
|
image: "clickhouse/clickhouse-server:24.3.3.102-alpine"
|
2023-09-25 10:49:55 +00:00
|
|
|
volumes:
|
|
|
|
- type: volume
|
|
|
|
source: event-data
|
|
|
|
target: /var/lib/clickhouse
|
|
|
|
- type: bind
|
|
|
|
source: ./clickhouse/clickhouse-config.xml
|
|
|
|
target: /etc/clickhouse-server/config.d/logging.xml
|
|
|
|
read_only: true
|
2024-07-10 11:58:53 +00:00
|
|
|
content: "<clickhouse><profiles><default><log_queries>0</log_queries><log_query_threads>0</log_query_threads></default></profiles></clickhouse>"
|
2023-09-25 10:49:55 +00:00
|
|
|
- type: bind
|
|
|
|
source: ./clickhouse/clickhouse-user-config.xml
|
|
|
|
target: /etc/clickhouse-server/users.d/logging.xml
|
|
|
|
read_only: true
|
2024-07-10 11:58:53 +00:00
|
|
|
content: '<clickhouse><logger><level>warning</level><console>true</console></logger><query_thread_log remove="remove"/><query_log remove="remove"/><text_log remove="remove"/><trace_log remove="remove"/><metric_log remove="remove"/><asynchronous_metric_log remove="remove"/><session_log remove="remove"/><part_log remove="remove"/></clickhouse>'
|
2023-09-25 10:49:55 +00:00
|
|
|
ulimits:
|
|
|
|
nofile:
|
|
|
|
soft: 262144
|
|
|
|
hard: 262144
|