⚽ Convocados Docs GitHub

Self-Hosting

Run your own Convocados instance using Docker, Fly.io, or any Node.js host.

Prerequisites

Option A — Docker

The project includes a production-ready Dockerfile.

Build the image

docker build -t convocados .

Run the container

docker run -d \
  --name convocados \
  -p 3000:3000 \
  -v convocados-data:/data \
  -e DATABASE_URL="file:/data/convocados.db" \
  -e NODE_ENV=production \
  convocados

The app will be available at http://localhost:3000. The -v flag mounts a named volume so your database persists across restarts.

Option B — Fly.io

Convocados is deployed on Fly.io by default. To deploy your own instance:

1. Install the Fly CLI

curl -L https://fly.io/install.sh | sh
fly auth login

2. Launch the app

fly launch

This reads the existing fly.toml and creates your app. Accept the defaults or customize the region.

3. Create a persistent volume

fly volumes create football_data --region cdg --size 1

4. Set secrets

fly secrets set DATABASE_URL="file:/data/convocados.db"
fly secrets set VAPID_PUBLIC_KEY="your-vapid-public-key"
fly secrets set VAPID_PRIVATE_KEY="your-vapid-private-key"
fly secrets set VAPID_SUBJECT="mailto:you@example.com"

5. Deploy

fly deploy

Option C — Bare Node.js

git clone https://github.com/Cabeda/Convocados.git
cd Convocados
npm ci
npx prisma generate
npm run build
DATABASE_URL="file:./convocados.db" npm run start

The start script runs prisma migrate deploy automatically before starting the server.

Environment variables

VariableRequiredDescription
DATABASE_URLYesSQLite connection string, e.g. file:/data/convocados.db
PORTNoServer port (default 3000)
NODE_ENVNoSet to production for production builds
VAPID_PUBLIC_KEYNo*VAPID public key for push notifications
VAPID_PRIVATE_KEYNo*VAPID private key for push notifications
VAPID_SUBJECTNo*VAPID subject (mailto: or URL)

* Required only if you want push notifications.

Generating VAPID keys: Run npx web-push generate-vapid-keys to create a new key pair.

Database

Convocados uses SQLite via Prisma. The database file is created automatically on first run. Migrations are applied by prisma migrate deploy which runs as part of the start script.

Important: Always mount a persistent volume for the database directory. Without it, your data will be lost on container restarts.

Health check

The app exposes GET /api/health which returns 200 OK when the server is running. Use this for load balancer or orchestrator health checks.