Skip to content

Add Umami web analytics example#296

Open
tjmgregory wants to merge 4 commits into
unikraft-cloud:mainfrom
tjmgregory:add-umami-example
Open

Add Umami web analytics example#296
tjmgregory wants to merge 4 commits into
unikraft-cloud:mainfrom
tjmgregory:add-umami-example

Conversation

@tjmgregory

Copy link
Copy Markdown

Summary

  • Adds a new umami/ example deploying Umami v3.0.3 open-source web analytics
  • Uses the existing postgres/ example as the database backend
  • FROM scratch final stage following the same pattern as httpserver-node21-nextjs
  • Includes SSL certificates in the image for TLS database connections
  • Documents a workaround for the missing pgcrypto extension (not needed on PG16+ which has gen_random_uuid() built-in)

Files

File Description
umami/Kraftfile Unikraft Cloud config, runs node /app/server.js
umami/Dockerfile Multi-stage build: clones Umami, builds Next.js standalone, strips to scratch
umami/README.md Step-by-step guide: deploy postgres, run migrations, deploy Umami
umami/.dockerignore Excludes .unikraft/ build artifacts

Tested on

  • kraft CLI v0.12.8
  • Metro: fra
  • Memory: 1024 MiB (minimum for the ~320 MB image)
  • PostgreSQL from the postgres/ example

🤖 Generated with Claude Code

Deploys Umami v3.0.3 as a Next.js standalone app on a FROM scratch
image, backed by the existing postgres example. Includes a workaround
for the missing pgcrypto extension (not needed on PG16+).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tjmgregory tjmgregory marked this pull request as draft April 15, 2026 16:12
tjmgregory and others added 3 commits April 15, 2026 18:16
- cd back to ../umami/ after postgres deploy (not examples/umami/)
- Note macOS sed -i '' syntax difference for pgcrypto patch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Location tracking is one of Umami's key features. Stripping it
saved 54 MB but isn't worth the loss in functionality. Users who
need a smaller image can add the rm line back.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 386 MB image (with GeoIP data) OOMs at 1024 MiB during initramfs
unpacking. 1536 MiB works reliably. Document the 1024 MiB option for
users who strip GeoIP.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tjmgregory tjmgregory marked this pull request as ready for review April 15, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant