Compose-Examples/examples/plausible/docker-compose.yml

61 lines
1.9 KiB
YAML
Raw Normal View History

2023-02-15 21:45:31 +00:00
version: "3.3"
services:
#mail:
# image: bytemark/smtp
# restart: always
# container_name: plausible-smtp
plausible_db:
# supported versions are 12, 13, and 14
image: postgres:14-alpine
container_name: plausible-db
2023-02-15 21:45:31 +00:00
restart: always
#networks:
# - proxy
2023-02-15 21:45:31 +00:00
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/plausible/database/:/var/lib/postgresql/data
2023-02-15 21:45:31 +00:00
environment:
2024-01-14 19:35:29 +00:00
- POSTGRES_PASSWORD=${PSQL_PASS:-password}
2023-02-15 21:45:31 +00:00
plausible_events_db:
container_name: plausible-events-db
image: clickhouse/clickhouse-server:22.6-alpine
restart: always
#networks:
# - proxy
2023-02-15 21:45:31 +00:00
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/plausible/event-data:/var/lib/clickhouse
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/plausible/clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/plausible/clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
2023-02-15 21:45:31 +00:00
ulimits:
nofile:
soft: 262144
hard: 262144
plausible:
container_name: plausible
image: plausible/analytics:v2.0.0
2023-02-15 21:45:31 +00:00
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:
- 8000:8000 # WEB UI
env_file:
2024-01-14 19:35:29 +00:00
- .env
#networks:
# - proxy
2023-02-15 21:45:31 +00:00
#labels:
# - traefik.enable=true
# - traefik.http.routers.plausible.rule=Host(`plausible.example.com`)
# - traefik.http.services.plausible.loadbalancer.server.port=8000
# - traefik.docker.network=proxy
# # Part for local lan services only
# # - traefik.http.routers.plausible.middlewares=local-ipwhitelist@file
#networks:
# proxy:
# external: true