The repository ships a multi-stageDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/midudev/mundial-de-clicks/llms.txt
Use this file to discover all available pages before exploring further.
Dockerfile and a docker-compose.yml that bring up the complete infrastructure — DragonFly, Postgres, and Umami — with a single command. The Astro app runs alongside those services in development and is packaged as its own container for production.
Docker Compose services
Thedocker-compose.yml defines three infrastructure services. The Astro app itself is not included in the Compose file: in development you run it with pnpm dev; in production you build and run its own image separately (or let Coolify manage it).
| Service | Image | Exposed port | Purpose |
|---|---|---|---|
dragonfly | docker.dragonflydb.io/dragonflydb/dragonfly:latest | 6379 | Vote storage — Redis-compatible in-memory database |
postgres | postgres:16-alpine | internal only | Relational store required by Umami |
umami | ghcr.io/umami-software/umami:postgresql-latest | 3001 | Self-hosted web analytics dashboard |
Local development
Building the production image
TheDockerfile uses a two-stage build to keep the final image small.
Stage 1 — build (node:22-alpine)
Installs all dependencies via pnpm (respecting pnpm-lock.yaml), then accepts two optional build arguments that Vite bakes into the JavaScript bundle at compile time:
node:22-alpine)
Copies only dist/ from the build stage and reinstalls production-only dependencies. The final image contains no dev tooling or source files.
Build command
--build-arg flags entirely if you don’t need Umami analytics.
Run command
host.docker.internal resolves to the host machine from inside a Docker container on macOS and Windows. On Linux, use --add-host=host.docker.internal:host-gateway or replace it with your DragonFly container’s IP / service name.
Dockerfile overview
DragonFly persistence in Docker
DragonFly uses RDB-style snapshots rather than AOF. Thedocker-compose.yml starts it with:
--snapshot_cron "*/5 * * * *" triggers a snapshot to /data/snapshot every 5 minutes. On an unexpected restart, at most 5 minutes of vote data is lost — an acceptable trade-off for a click counter. The dragonfly-data named volume persists the snapshot file across container restarts and upgrades.
The
ulimits: memlock: -1 setting in the Compose file is required for
DragonFly to lock its working set in physical memory. Without it, DragonFly
may log warnings or refuse to start on some Linux kernel configurations.Environment variables in Compose
Copy.env.example to .env and uncomment the values you want to override. All variables have sensible defaults for local development.
The following variables are only meaningful inside docker-compose and are not read by the Astro app:
| Variable | Default | Purpose |
|---|---|---|
POSTGRES_DB | umami | Postgres database name for Umami |
POSTGRES_USER | umami | Postgres user for Umami |
POSTGRES_PASSWORD | umami_password | Postgres password for Umami |
UMAMI_APP_SECRET | cambia_este_secreto | Umami session signing secret |