Deploying a Prestix App
Introduction
Prestix is an open-source ticketing and event management platform. Deploying Prestix with a Dockerfile on Klutch.sh gives you reproducible builds, managed secrets, and persistent storage—all configured from klutch.sh/app. This guide covers installation, Dockerfile setup, environment variables, storage, Nixpacks overrides, and sample checks to verify your instance.
Prerequisites
- A Klutch.sh account (sign up)
- A GitHub repository containing your Prestix Dockerfile (GitHub is the only supported git source)
- External PostgreSQL database
- Domain and TLS for customer-facing ticket sales
For onboarding, see the Quick Start.
Architecture and ports
- Prestix serves HTTP on internal port
3000. Choose HTTP traffic in Klutch.sh and set the internal port to3000. - Persistent storage is recommended for user uploads (e.g., event images). Primary data resides in Postgres.
Repository layout
prestix/├── Dockerfile # Must be at repo root for auto-detection└── README.mdKeep secrets out of Git; store them in Klutch.sh environment variables.
Installation (local) and starter commands
Build and run locally (ensure Postgres is reachable):
docker build -t prestix-local .docker run -p 3000:3000 \ -e DATABASE_URL=postgres://user:pass@localhost:5432/prestix \ -e SECRET_KEY_BASE=$(openssl rand -hex 32) \ prestix-localDockerfile for Prestix (production-ready)
Place this at the repo root; Klutch.sh auto-detects Dockerfiles.
FROM node:18-alpine AS builderWORKDIR /appCOPY package*.json ./RUN npm ciCOPY . .RUN npm run build
FROM node:18-alpine AS runnerWORKDIR /appENV NODE_ENV=productionENV PORT=3000COPY --from=builder /app/.next ./.nextCOPY --from=builder /app/public ./publicCOPY --from=builder /app/package*.json ./RUN npm ci --omit=devEXPOSE 3000CMD ["npm", "run", "start"]Notes:
- Pin Node to the version Prestix supports; adjust if upstream changes.
- Keep the Dockerfile at repo root; Docker selection is automatic in Klutch.sh.
Environment variables (Klutch.sh)
Set these before deploying:
PORT=3000DATABASE_URL=postgres://<user>:<password>@<host>:5432/<db>SECRET_KEY_BASE=<secure-random-hex>- Optional OAuth/email settings if Prestix supports them (e.g.,
SMTP_HOST,SMTP_USER,SMTP_PASS,SMTP_PORT)
If deploying without the Dockerfile and relying on Nixpacks:
NIXPACKS_NODE_VERSION=18NIXPACKS_START_CMD=npm run start
Attach persistent volumes
If you store local assets, add storage in Klutch.sh (path and size only):
/app/storage— uploads or cached assets.
Match the path to your Prestix configuration.
Deploy Prestix on Klutch.sh (Dockerfile workflow)
- Push your repo—with the Dockerfile at the root—to GitHub.
- Open klutch.sh/app, create a project, and add an app.
- Select HTTP traffic and set the internal port to
3000. - Add the environment variables above (database, secret key, and optional SMTP/OAuth settings).
- Attach a volume at
/app/storageif you need local asset persistence, sized for your media. - Deploy. Access your app at
https://example-app.klutch.sh; add a custom domain if desired.
Sample checks
Basic landing check:
curl -I https://example-app.klutch.shIf Prestix exposes a health endpoint, probe it (replace if different):
curl -I https://example-app.klutch.sh/api/healthHealth checks and production tips
- Add an HTTP readiness probe to
/or your health endpoint. - Keep
SECRET_KEY_BASEand DB credentials in Klutch.sh secrets; rotate them regularly. - Use external Postgres for durability; back it up on a schedule.
- Pin Docker base versions and test upgrades in staging before production.
- Monitor storage usage on
/app/storageif enabled; resize volumes proactively.
Prestix on Klutch.sh delivers reproducible Docker builds, managed secrets, and optional storage—without extra YAML or CI steps. Configure ports, env vars, and storage, then launch your ticketing platform.