This project sets up the Umami analytics platform with a PostgreSQL database. As well as a docusaurus Logos.co website with Umami integration through the docusaurus umami plugin located in packages/docusaurus-plugin-umami
. Also includes a Next.js test app with Umami integration.
Note: Change the default PostgreSQL credentials if you're using this in production.
# Install dependencies
yarn setup
# Link the docusaurus umami plugin to the Logos.co site
yarn link:plugin
- Start Umami services
# Start Umami services
yarn umami:up
# Stop Umami services
yarn umami:down
- Login to the dashboard:
Visit http://localhost:3000/login
- Username:
admin
- Password:
umami
- Review the
docker-compose.yaml
.
version: "3.8"
services:
db:
image: postgres:15
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: umami
volumes:
- umami-db-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U umami"]
interval: 5s
timeout: 5s
retries: 5
umami:
image: docker.umami.is/umami-software/umami:postgresql-latest
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://umami:umami@db:5432/umami
depends_on:
db:
condition: service_healthy
volumes:
umami-db-data:
- Start the containers:
docker-compose up --build -d
- Access the dashboard:
Open http://localhost:3000/login in your browser.
- Username:
admin
- Password:
umami
- Run PostgreSQL:
docker run -d \
--name umami-db \
-e POSTGRES_DB=umami \
-e POSTGRES_USER=umami \
-e POSTGRES_PASSWORD=umami \
-p 5432:5432 \
postgres:15
- Run Umami:
docker run -d \
--name umami \
--link umami-db:db \
-e DATABASE_URL=postgresql://umami:umami@db:5432/umami \
-p 3000:3000 \
docker.umami.is/umami-software/umami:postgresql-latest
- Login to the dashboard:
Visit http://localhost:3000/login
- Username:
admin
- Password:
umami
- Open umami dashboard
- Go to
Settings
>Add website
- Fill in the form
- Add the tracking info in
apps/next-test/src/app/layout.tsx
(line 30) for the next-test app - Repeat 1-3 for the logos.co app and add the tracking info in
apps/logos.co/docusaurus.config.js
(line 56)
# Start Next.js Test App
yarn next-test:start
# Start Logos.co
yarn logos:start