smiklosovic commented on a change in pull request #38: URL: https://github.com/apache/cassandra-builds/pull/38#discussion_r591396793
########## File path: plausible/README.adoc ########## @@ -0,0 +1,152 @@ +== Analytics for Cassandra Web + +This document serves as a guide for anybody who wants to re/deploy https://plausible.io/[Plausible]. + +=== Overview of the current deployment + +Plausible is currently deployed on t2.medium instance in AWS EC2, it runs on Debian 10 Buster and +it has Elastic IP 3.124.255.5 (stays after restarts). Plausible runs in Docker Compose and it is +secured by HTTPS. Certificates for HTTPS are obtained from Let's Encrypt and they are +automatically renewed after expiration. There is nginx reverse proxy in front of Plausible as +the other Docker Compose deployment. + +Plausible service is hosted under https://www.instaclustr.com[Instaclustr]'s account. Please contact +stefan dot miklosovic at instaclustr dot com for any related questions / issues. + +Domain `plausible.cassandra.apache.org` points to 3.124.255.5. Please contact gmcdonald at apache dot org for +any related questions / issues. + +For the access to all credentials (PEM to ssh to that box, logins to Plausible etc), please contact +mck at apache dot org. + +=== Setup of Plausible from scratch + +Please be sure that before proceeding, your box has these services / software installed: + +* docker +* docker-compose +* git + +The deployment consists of these logical steps: + +* setup HTTPS for nginx proxy +* setup & run self-hosted Plausible +* setup & run reverse nginx proxy talking to Plausible + +==== Setup of HTTP for nginx proxy + +First we generate HTTPS certificates: + +---- +$ git clone https://github.com/wmnnd/nginx-certbot.git +$ cd nginx-certbox +---- + +Follow the https://github.com/wmnnd/nginx-certbot[readme] of nginx-certbox repo. You need to change +`domains` in `init-letsencrypt.sh` script to `domains=(plausible.cassandra.apache.org)`. + +Next, modify `data/nginx/app.conf`, change `server_name` to `plausible.cassandra.apache.org` for +both 80 and 443 case and change paths to certificates. + +`proxy_pass` field of `location /` for server listening to port 443 should be set to `http://plausible:8000/;`. +`plausible` in this address points to name of a service of Docker compose we will setup afterwards. + +This will generate HTTPS certificates, please be sure that you have 80 and 443 port open. + +---- +$ ./init-letsencrypt.sh +$ docker-compose up -d +---- + +`data/nginx/app.conf` file with described changes is also in the same directory as this document for reference. + +==== Setup of Plausible + +---- +$ git clone https://github.com/plausible/hosting +$ cd hosting +---- + +The main configuration file is `plausible-conf.env` + +---- [email protected] +ADMIN_USER_NAME=admin +ADMIN_USER_PWD=you will log in with this password under ADMIN_USER_EMAIL +BASE_URL=https://plausible.cassandra.apache.org/ +SECRET_KEY_BASE=fMHBLyITacfbah4DF7qvnPydAkiE6h1cbNRbv0jDZzJ3q61uNyZ173Epx9pPVPkn Review comment: I rotated it and changed docs a bit. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

