5 Commits

2 changed files with 10 additions and 13 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
data/
.env

View File

@ -3,18 +3,20 @@ services:
# Plausible v2.1.1 was tested against PostgreSQL versions 15 and 16 # Plausible v2.1.1 was tested against PostgreSQL versions 15 and 16
# https://github.com/plausible/analytics/blob/v2.1.1/.github/workflows/elixir.yml#L21-L32 # https://github.com/plausible/analytics/blob/v2.1.1/.github/workflows/elixir.yml#L21-L32
image: postgres:16-alpine image: postgres:16-alpine
stop_grace_period: 60s
restart: always restart: always
volumes: volumes:
- db-data:/var/lib/postgresql/data - ./data/postgres:/var/lib/postgresql/data
environment: environment:
- POSTGRES_PASSWORD=postgres - POSTGRES_PASSWORD=postgres
plausible_events_db: plausible_events_db:
image: clickhouse/clickhouse-server:24.3.3.102-alpine image: clickhouse/clickhouse-server:24.3.3.102-alpine
stop_grace_period: 60s
restart: always restart: always
volumes: volumes:
- event-data:/var/lib/clickhouse - ./data/clickhouse:/var/lib/clickhouse
- event-logs:/var/log/clickhouse-server - ./data/clickhouse-logs:/var/log/clickhouse-server
- ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro - ./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 - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
ulimits: ulimits:
@ -24,20 +26,13 @@ services:
plausible: plausible:
image: ghcr.io/plausible/community-edition:v2.1.1 image: ghcr.io/plausible/community-edition:v2.1.1
stop_grace_period: 60s
restart: always restart: always
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run" command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
depends_on: depends_on:
- plausible_db - plausible_db
- plausible_events_db - plausible_events_db
ports: ports:
- 127.0.0.1:8000:8000 - 127.0.0.1:84:8000
env_file: env_file:
- plausible-conf.env - .env
volumes:
db-data:
driver: local
event-data:
driver: local
event-logs:
driver: local