plausible-hosting/k8s-manifests
2021-05-15 09:31:31 +12:00
..
event-data-persistentvolumeclaim.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
mail-deployment.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
plausible-deployment.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
plausible-events-db-deployment.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
plausible-events-db-service.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
plausible-service.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
postgres.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
postgresql.yaml Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00
README.org Add WIP Kubernetes support 2021-05-15 09:31:31 +12:00

Setup Plausible

Setup

  kubectl create ns plausible
  kubectl -n plausible create secret generic postgres-configuration \
    --from-literal=POSTGRES_DB=plausible \
    --from-literal=POSTGRES_USER=plausible \
    --from-literal=POSTGRES_PASSWORD=plausible \
    --from-literal=PGUSER=plausible \
    --from-literal=PGPASSWORD=plausible \
    --from-literal=PGDATABASE=plausible
  kubectl -n plausible apply -f postgresql.yaml
  DATABASE_PWD="$(kubectl -n plausible get secret plausible.plausible-db.credentials.postgresql.acid.zalan.do -o=jsonpath='{.data.password}' | base64 --decode)"
  kubectl -n plausible create secret generic plausible \
    --from-literal=ADMIN_USER_EMAIL=myemail@example.com \
    --from-literal=ADMIN_USER_NAME="Example User" \
    --from-literal=ADMIN_USER_PWD="password" \
    --from-literal=SECRET_KEY_BASE="$(openssl rand -base64 64)" \
    --from-literal=DATABASE_URL="postgres://plausible:$DATABASE_PWD@plausible-db-pooler/plausible?ssl=true" \
    --from-literal=CLICKHOUSE_DATABASE_URL=http://plausible-events-db:8123/plausible
  kubectl -n plausible create configmap plausible \
    --from-literal=BASE_URL=http://192.168.39.97:31943
  kubectl -n plausible apply -f .