59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
version: '3'
|
|
|
|
networks:
|
|
web:
|
|
external: true
|
|
plausible:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres-data:
|
|
clickhouse-data:
|
|
|
|
services:
|
|
mail:
|
|
image: bytemark/smtp
|
|
restart: unless-stopped
|
|
|
|
plausible_db:
|
|
image: postgres:14-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
networks:
|
|
- plausible
|
|
|
|
plausible_events_db:
|
|
image: clickhouse/clickhouse-server:22.6-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- clickhouse-data:/var/lib/clickhouse
|
|
- ./clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
|
|
- ./clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
|
|
ulimits:
|
|
nofile:
|
|
soft: 262144
|
|
hard: 262144
|
|
networks:
|
|
- plausible
|
|
|
|
plausible:
|
|
image: plausible/analytics:v1.5.1
|
|
restart: unless-stopped
|
|
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
|
|
env_file:
|
|
- .env
|
|
networks:
|
|
- plausible
|
|
- web
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.grafana.entrypoints=http"
|
|
- "traefik.http.routers.grafana.rule=Host(`${PLAUSIBLE_HOST}`)"
|
|
- "traefik.http.services.grafana.loadbalancer.server.port=8000" |