4 Commits

Author SHA1 Message Date
76fa24dc35 Add stop_grace_period of 60s to all containers 2025-06-29 20:15:35 -05:00
54c3e37087 Expose plausible HTTP port (locally) 2025-06-29 20:07:22 -05:00
12ccb4bfe7 Replace docker volumes with bind mounts 2025-06-29 20:04:43 -05:00
940f3d94cb Create LICENSE 2024-12-04 19:19:00 +07:00
4 changed files with 33 additions and 10 deletions

1
.gitignore vendored
View File

@ -3,4 +3,5 @@
!clickhouse/logs.xml !clickhouse/logs.xml
!clickhouse/ipv4-only.xml !clickhouse/ipv4-only.xml
!README.md !README.md
!LICENSE
!.gitignore !.gitignore

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Plausible Analytics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

4
compose.override.yml Normal file
View File

@ -0,0 +1,4 @@
services:
plausible:
ports:
- 127.0.0.1:84:80

View File

@ -1,9 +1,10 @@
services: services:
plausible_db: plausible_db:
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
healthcheck: healthcheck:
@ -13,10 +14,11 @@ services:
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/logs.xml:/etc/clickhouse-server/config.d/logs.xml:ro - ./clickhouse/logs.xml:/etc/clickhouse-server/config.d/logs.xml:ro
# This makes ClickHouse bind to IPv4 only, since Docker doesn't enable IPv6 in bridge networks by default. # This makes ClickHouse bind to IPv4 only, since Docker doesn't enable IPv6 in bridge networks by default.
# Fixes "Listen [::]:9000 failed: Address family for hostname not supported" warnings. # Fixes "Listen [::]:9000 failed: Address family for hostname not supported" warnings.
@ -32,6 +34,7 @@ services:
plausible: plausible:
image: ghcr.io/plausible/community-edition:v2.1.2 image: ghcr.io/plausible/community-edition:v2.1.2
stop_grace_period: 60s
restart: always restart: always
command: sh -c "/entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run" command: sh -c "/entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
depends_on: depends_on:
@ -40,7 +43,7 @@ services:
plausible_events_db: plausible_events_db:
condition: service_healthy condition: service_healthy
volumes: volumes:
- plausible-data:/var/lib/plausible - ./data/plausible:/var/lib/plausible
ulimits: ulimits:
nofile: nofile:
soft: 65535 soft: 65535
@ -83,9 +86,3 @@ services:
- MAILGUN_BASE_URI - MAILGUN_BASE_URI
- MANDRILL_API_KEY - MANDRILL_API_KEY
- SENDGRID_API_KEY - SENDGRID_API_KEY
volumes:
db-data:
event-data:
event-logs:
plausible-data: