plausible-hosting/docker-compose.yml

55 lines
1.3 KiB
YAML
Raw Normal View History

2020-09-29 07:00:52 -05:00
version: "3.3"
services:
mail:
image: bytemark/smtp
restart: always
plausible_db:
2022-09-24 03:35:33 -05:00
# supported versions are 12, 13, and 14
2022-09-07 04:01:57 -05:00
image: postgres:14-alpine
restart: always
2020-09-29 07:00:52 -05:00
volumes:
2023-09-14 02:34:36 -05:00
- db-data:/var/lib/postgresql/data
2020-09-29 07:00:52 -05:00
environment:
- POSTGRES_PASSWORD=postgres
2023-09-13 21:53:52 -05:00
healthcheck:
2023-09-18 04:45:04 -05:00
test: ["CMD", "pg_isready", "-U", "postgres"]
2023-09-18 19:31:12 -05:00
interval: 5s
2020-09-29 07:00:52 -05:00
plausible_events_db:
2023-07-08 00:49:15 -05:00
image: clickhouse/clickhouse-server:23.3.7.5-alpine
restart: always
2020-09-29 07:00:52 -05:00
volumes:
2023-09-14 02:34:36 -05:00
- event-data:/var/lib/clickhouse
- ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
- ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
2020-09-29 07:00:52 -05:00
ulimits:
nofile:
soft: 262144
hard: 262144
2023-09-13 21:53:52 -05:00
healthcheck:
2023-09-18 04:45:04 -05:00
test: ["CMD", "clickhouse-client", "-q", "SELECT 1"]
2023-09-18 19:31:12 -05:00
interval: 5s
2020-09-29 07:00:52 -05:00
plausible:
2023-06-14 05:28:49 -05:00
image: plausible/analytics:v2.0
restart: always
2023-09-13 21:53:52 -05:00
command: sh -c "/entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
2020-09-29 07:00:52 -05:00
depends_on:
2023-09-13 21:53:52 -05:00
plausible_db:
condition: service_healthy
plausible_events_db:
condition: service_healthy
mail:
condition: service_started
2020-09-29 07:00:52 -05:00
ports:
- 8000:8000
2020-09-29 07:00:52 -05:00
env_file:
2023-09-14 02:34:36 -05:00
- plausible-conf.env
volumes:
db-data:
driver: local
event-data:
2023-09-18 04:45:04 -05:00
driver: local