mirror of
https://github.com/plausible/hosting.git
synced 2025-06-30 09:07:29 -05:00
Compare commits
16 Commits
v2.1.0
...
pre-rebase
Author | SHA1 | Date | |
---|---|---|---|
cfc987d060 | |||
f150c9c444 | |||
0f00aaffcb | |||
18bad757df | |||
d4324158d8 | |||
4e949e84f7 | |||
9cd73d990c | |||
5930193510 | |||
bfcbf76cde | |||
26c2804763 | |||
250fabfa65 | |||
43e8842846 | |||
e023cf8874 | |||
92f2445fbe | |||
8152c57c31 | |||
5632dbc22f |
20
.github/workflows/spellcheck.yml
vendored
Normal file
20
.github/workflows/spellcheck.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: spellcheck
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
codespell:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: codespell-project/actions-codespell@v2
|
||||||
|
with:
|
||||||
|
check_filenames: true
|
||||||
|
|
||||||
|
typos:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: crate-ci/typos@master
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
data/
|
||||||
|
.env
|
@ -902,14 +902,14 @@ You'll receive an email once the data is imported.
|
|||||||
|
|
||||||
### MaxMind integration
|
### MaxMind integration
|
||||||
|
|
||||||
To use MaxMind you need to create an account [here.](https://www.maxmind.com/en/geolite2/signup) Once you have your account details, you can add [MAXMIND_LICENSE_KEY](#maxmind_license_key) and [MAXMIND_EDITION](#maxmind_edition) environmental valiables to your [plausible-conf.env](./plausible-conf.env) and the databases would be automatically downloaded and kept up to date. Note that using city-level databases like MaxMind's GeoLite2-City requires ~1GB more RAM.
|
To use MaxMind you need to create an account [here.](https://www.maxmind.com/en/geolite2/signup) Once you have your account details, you can add [MAXMIND_LICENSE_KEY](#maxmind_license_key) and [MAXMIND_EDITION](#maxmind_edition) environmental variables to your [plausible-conf.env](./plausible-conf.env) and the databases would be automatically downloaded and kept up to date. Note that using city-level databases like MaxMind's GeoLite2-City requires ~1GB more RAM.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>How do I access Plausible from terminal?</summary>
|
<summary>How do I access Plausible from terminal?</summary>
|
||||||
|
|
||||||
You can starts an Interactive Elixir session from within the `plausible` container:
|
You can start an Interactive Elixir session from within the `plausible` container:
|
||||||
|
|
||||||
<sub><kbd>console</kbd></sub>
|
<sub><kbd>console</kbd></sub>
|
||||||
```console
|
```console
|
||||||
@ -937,7 +937,7 @@ iex> Application.get_all_env :plausible
|
|||||||
<details>
|
<details>
|
||||||
<summary>How do I access ClickHouse from terminal?</summary>
|
<summary>How do I access ClickHouse from terminal?</summary>
|
||||||
|
|
||||||
You can starts a `clickhouse client` session from within the `plausible_events_db` container:
|
You can start a `clickhouse client` session from within the `plausible_events_db` container:
|
||||||
|
|
||||||
<sub><kbd>console</kbd></sub>
|
<sub><kbd>console</kbd></sub>
|
||||||
```console
|
```console
|
||||||
@ -975,7 +975,7 @@ $ docker compose exec plausible_events_db clickhouse client --database plausible
|
|||||||
<details>
|
<details>
|
||||||
<summary>How do I access PostgreSQL from terminal?</summary>
|
<summary>How do I access PostgreSQL from terminal?</summary>
|
||||||
|
|
||||||
You can starts a `psql` session from within the `plausible_db` container:
|
You can start a `psql` session from within the `plausible_db` container:
|
||||||
|
|
||||||
<sub><kbd>console</kbd></sub>
|
<sub><kbd>console</kbd></sub>
|
||||||
```console
|
```console
|
||||||
|
@ -3,6 +3,13 @@
|
|||||||
<level>warning</level>
|
<level>warning</level>
|
||||||
<console>true</console>
|
<console>true</console>
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Avoid the warning: "Listen [::]:9009 failed: Address family for hostname not supported".
|
||||||
|
If Docker has IPv6 disabled, bind ClickHouse to IPv4 to prevent this issue.
|
||||||
|
Add this to the configuration to ensure it listens on all IPv4 interfaces:
|
||||||
|
<listen_host>0.0.0.0</listen_host>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Stop all the unnecessary logging -->
|
<!-- Stop all the unnecessary logging -->
|
||||||
<query_thread_log remove="remove"/>
|
<query_thread_log remove="remove"/>
|
||||||
|
@ -1,20 +1,22 @@
|
|||||||
services:
|
services:
|
||||||
plausible_db:
|
plausible_db:
|
||||||
# Plausible v2.1.0 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.0/.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:
|
||||||
@ -23,21 +25,14 @@ services:
|
|||||||
hard: 262144
|
hard: 262144
|
||||||
|
|
||||||
plausible:
|
plausible:
|
||||||
image: ghcr.io/plausible/community-edition:v2.1.0
|
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
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
ServerName example.com
|
ServerName example.com
|
||||||
|
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
ProxyAddHeaders On
|
||||||
|
ProxyPassMatch ^/(live/websocket)$ ws://localhost:8000/$1
|
||||||
ProxyPass / http://localhost:8000/
|
ProxyPass / http://localhost:8000/
|
||||||
ProxyPassReverse / http://localhost:8000/
|
ProxyPassReverse / http://localhost:8000/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user