Closed ruslandoga closed 1 year ago
The highlights of this release are:
⚠️ ⚠️ ⚠️
Upgrading to
v2.0
requires performing a data migration. Please read these notes till the end before deployingv2.0.0-rc.0
In your docker-compose.yml
update the image used for plausible
to v2.0.0-rc.0
plausible:
- image: plausible/analytics:v1.5.1
+ image: plausible/analytics:v2.0.0-rc.0
and restart the container
$ cd hosting
$ docker compose stop plausible
$ docker compose rm plausible
$ docker compose up -d
This will boot up the new version of the app.
If you open the dashboards now, you wouldn't see any past metrics. This is expected as v2.0
uses new events_v2
and sessions_v2
tables to store analytics data. We need to move data from old tables and for that we perform the next step.
⚠️ ⚠️ ⚠️
You need enough disk space available for x2 current
plausible_events_db
'sevent-data
volume size. You can use something likedocker system df -v | grep hosting_event-data
to check how much space the current volume is occupying.
Connect to the running plausible
container and start the migration flow
$ cd hosting
$ docker compose exec plausible bin/plausible rpc Plausible.DataMigration.NumericIDs.run
You can attempt this migration multiple times (unless you perform the next step).
Once you verify the migration went well, the old tables can be dropped. It's easiest to use clickhouse-client
for this
$ ch hosting
$ docker compose exec plausible_events_db clickhouse-client
:) \c plausible_events_db
:) show tables;
:) drop table events;
:) drop table sessions;
See https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#max-table-size-to-drop for how to drop tables with more than 50GB of data.
In your plausible-config.env
set MAXMIND_LICENSE_KEY
environment variable and get an automatically updated GeoLite2 City geolocation database. The database edition is configurable with MAXMIND_EDITION
environment variable and defaults to GeoLite2-City
.
+ MAXMIND_LICENSE_KEY=LNpsJCCKPis6XvBP
+ MAXMIND_EDITION=GeoLite2-City
Now you can remove any other volumes and services used to download, store, and update geolocation databases.
Following changes have been made since v1.5:
tagged-events
classnamesBamboo.MailgunAdapter
, Bamboo.MandrillAdapter
, Bamboo.SendGridAdapter
plausible/analytics#2649PUT /api/v1/sites
)bounce_rate
IP_BLOCKLIST
environment variablev2.0.0-rc.0
https://github.com/plausible/analytics/discussions/2896 has been published.
This issue is used to track the next self-hosted release.