Closed vanuverma closed 2 months ago
In addition to the above, it would be nice if you can provide commands for multiple OS (i.e. for mac, windows, linux etc. separately). Thanks
When I tried to use a public domain url (hosted via aws amplify), I am able to see the user registration page for plausible-ce locally (http://localhost:80/register), but the register
button click does not do anything. Below is my docker container log:
`
2024-09-26 12:13:38 Loading plausible..
2024-09-26 12:13:38 Starting dependencies..
2024-09-26 12:13:38 Starting repos..
2024-09-26 12:13:38 02:13:38.967 [error] Postgrex.Protocol (#PID<0.150.0>) failed to connect: (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "plausible_db" does not exist
2024-09-26 12:13:38 02:13:38.967 [error] Postgrex.Protocol (#PID<0.149.0>) failed to connect: (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "plausible_db" does not exist
2024-09-26 12:13:38 02:13:38.981 [error] Ch.Connection (#PID<0.158.0>) failed to connect: (Ch.Error) Code: 81. DB::Exception: Database plausible_events_db does not exist. (UNKNOWN_DATABASE) (version 24.3.3.102 (official build))
2024-09-26 12:13:38
2024-09-26 12:13:38 02:13:38.981 [error] Ch.Connection (#PID<0.157.0>) failed to connect: (Ch.Error) Code: 81. DB::Exception: Database plausible_events_db does not exist. (UNKNOWN_DATABASE) (version 24.3.3.102 (official build))
2024-09-26 12:13:38
2024-09-26 12:13:39 Creating Plausible.Repo database..
2024-09-26 12:13:39 Creating Plausible.IngestRepo database..
2024-09-26 12:13:39 Creation of Db successful!
2024-09-26 12:13:40 Loading plausible..
2024-09-26 12:13:40 Starting dependencies..
2024-09-26 12:13:40 Starting repos..
2024-09-26 12:13:45 list-partitions Done!
2024-09-26 12:13:45
2024-09-26 12:13:45 ------------------------------------------------------------------------------
2024-09-26 12:13:45 get-sessions-table-settings Done!
2024-09-26 12:13:45
2024-09-26 12:13:45 ------------------------------------------------------------------------------
2024-09-26 12:13:45 drop-sessions-tmp-table Done!
2024-09-26 12:13:45
2024-09-26 12:13:45 ------------------------------------------------------------------------------
2024-09-26 12:13:45 create-sessions-tmp-table Done!
2024-09-26 12:13:45
2024-09-26 12:13:45 ------------------------------------------------------------------------------
2024-09-26 12:13:45 exchange-sessions-tables Done!
2024-09-26 12:13:45
2024-09-26 12:13:45 ------------------------------------------------------------------------------
2024-09-26 12:13:45 Migration done!
2024-09-26 12:13:45 Backfilling legacy site import across 0 sites (DRY RUN: false)...
2024-09-26 12:13:45 Finished backfilling sites.
2024-09-26 12:13:45 Adjusting end dates of 0 site imports (DRY RUN: false)...
2024-09-26 12:13:45 Finished adjusting end dates of site imports.
2024-09-26 12:13:45 Finished
2024-09-26 12:13:46 truncate-location-data-table Done!
2024-09-26 12:13:46
2024-09-26 12:13:46 ------------------------------------------------------------------------------
2024-09-26 12:13:46 create-location-data-table Done!
2024-09-26 12:13:46
2024-09-26 12:13:46 ------------------------------------------------------------------------------
2024-09-26 12:13:47 update-location-data-dictionary Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:47 add-alias-column Done!
2024-09-26 12:13:47
2024-09-26 12:13:47 ------------------------------------------------------------------------------
2024-09-26 12:13:48 add-alias-column Done!
2024-09-26 12:13:48
2024-09-26 12:13:48 ------------------------------------------------------------------------------
2024-09-26 12:13:48 update-location-data-table-comment Done!
2024-09-26 12:13:48
2024-09-26 12:13:48 ------------------------------------------------------------------------------
2024-09-26 12:13:53 02:13:53.854 [notice] Generating a temporary self-signed certificate. This certificate will be used until a proper certificate is issued by the CA server.
2024-09-26 12:14:01 02:14:01.098 [error] Use of --no-self-upgrade is deprecated.
2024-09-26 12:14:01 Saving debug log to /var/lib/plausible/site_encrypt/certbot/acme-v02.api.letsencrypt.org/log/letsencrypt.log
2024-09-26 12:14:01 Account registered.
2024-09-26 12:14:01 Requesting a certificate for dev.
`
👋 @vanuverma
The local setup is the same except you would set BASE_URL to something like http://localhost:8000
and skip HTTPS.
Hi @ruslandoga Thanks for your feedback. Can you please clarify what is the purpose of BASE_URL? In the wiki page in your github repo here, it says link generation. Link generation compared to what, my website or where the plausible is hosted (i.e. in docker)? Should it be the link of my website (i.e. my local react app is running on http://localhost:5173)? Also there isn't any guidance on how to disable HTTPS for localhost. Can you please provide the steps as well? Thanks
👋 @vanuverma
All configuration is about Plausible itself. To disable HTTPS you simply skip setting HTTPS_PORT=443.
Here's how you can run Plausible on localhost:
$ git clone -b v2.1.3 --single-branch https://github.com/plausible/community-edition plausible-ce
$ cd plausible-ce
$ touch .env
$ echo "BASE_URL=http://localhost:8000" >> .env
$ echo "SECRET_KEY_BASE=$(openssl rand -base64 48)" >> .env
$ cat > compose.override.yml << EOF
services:
plausible:
ports:
- 8000:8000
EOF
$ docker compose up -d
Thanks @ruslandoga I will try it out and get back to you.
Hi, Can you please provide a step-by-step guide on how to setup plausible-ce in local machine (using Docker) and make it track page visits for a locally running single-page application? I am trying to verify whether plausible is suitable for my use case, and wanted to try it out locally first as I don't have any domain as of now. Also, I may not buy any domain and may run it over intranet. As per the current document, it does not explain what should be the
BASE_URL
and how to configure that to track a locally running SPA (i.e I am running a react-vite app on localhost:5173). A step-by-step guide for this type of scenarios would be very helpful to test plausible-ce locally prior to making any decision. Thanks.