infrastructure/ansible/roles/plausible/files/docker-compose.yml

71 lines
2.4 KiB
YAML
Raw Normal View History

2020-07-21 20:55:44 +01:00
version: "2.3"
services:
plausible:
image: plausible/analytics:v2.0
2020-08-04 19:38:01 +01:00
restart: unless-stopped
2020-08-04 22:07:45 +01:00
command: sh -c "/entrypoint.sh db migrate && /entrypoint.sh run"
2020-07-21 20:55:44 +01:00
depends_on:
- db
- clickhouse
networks:
- default
- traefik
2020-07-21 20:55:44 +01:00
labels:
- traefik.enable=true
- traefik.http.routers.plausible.rule=Host(`plausible.theorangeone.net`)
- traefik.http.services.plausible-plausible.loadbalancer.server.port=8000 # https://github.com/plausible/analytics/pull/237
- traefik.http.routers.plausible-embed.rule=Host(`elbisualp.theorangeone.net`)
- traefik.http.routers.plausible-embed.service=plausible-plausible
2020-11-25 11:38:47 +00:00
# https://github.com/plausible/analytics/pull/340
2020-11-25 11:41:26 +00:00
- traefik.http.middlewares.plausible-index.replacepathregex.regex=/js/index.js
2020-11-25 11:38:47 +00:00
- traefik.http.middlewares.plausible-index.replacepathregex.replacement=/js/plausible.js
- traefik.http.routers.plausible-embed.middlewares=plausible-index
2020-11-25 11:38:47 +00:00
2020-07-21 20:55:44 +01:00
environment:
- SECRET_KEY_BASE={{ plausible_secret_key }}
- SIGNING_SALT={{ plausible_signing_salt }}
2020-07-21 20:55:44 +01:00
- DATABASE_URL=postgres://plausible:plausible@db:5432/plausible
- DISABLE_REGISTRATION=true
- DISABLE_SUBSCRIPTION=true
- CLICKHOUSE_DATABASE_URL=http://clickhouse:8123/plausible
- BASE_URL=https://elbisualp.theorangeone.net
- GOOGLE_CLIENT_ID={{ plausible_google_client_id }}
- GOOGLE_CLIENT_SECRET={{ plausible_google_client_secret }}
2022-09-22 08:23:30 +01:00
- RELEASE_DISTRIBUTION=none
2022-09-22 08:37:00 +01:00
- MAILER_EMAIL={{ plausible_from_email }}
- SMTP_HOST_ADDR=smtp.eu.mailgun.org
- SMTP_HOST_PORT=465
- SMTP_USER_NAME={{ plausible_smtp_user }}
- SMTP_USER_PWD={{ plausible_smtp_password }}
- SMTP_HOST_SSL_ENABLED=true
2020-07-21 20:55:44 +01:00
clickhouse:
image: clickhouse/clickhouse-server:22.6-alpine
2020-08-04 19:38:01 +01:00
restart: unless-stopped
2020-07-21 20:55:44 +01:00
volumes:
- ./clickhouse:/var/lib/clickhouse
- ./docker_related_config.xml:/etc/clickhouse-server/config.d/docker_related_config.xml:ro
- ./docker_related_user_config.xml:/etc/clickhouse-server/users.d/docker_related_user_config.xml:ro
tmpfs:
- /var/log/clickhouse-server
2020-07-21 20:55:44 +01:00
ulimits:
nofile:
soft: 262144
hard: 262144
db:
2021-12-22 12:57:49 +00:00
image: postgres:14-alpine
2020-07-21 20:55:44 +01:00
restart: unless-stopped
volumes:
- ./postgres:/var/lib/postgresql/data
2020-07-21 20:55:44 +01:00
environment:
- POSTGRES_PASSWORD=plausible
- POSTGRES_USER=plausible
networks:
traefik:
external: true