Testiment

Quick Start

Fastest way to run Testiment, including prerequisites and deployment options.

Prerequisites

  • Docker Engine 24+ and Docker Compose v2
  • 2 vCPU / 4 GB RAM / 40 GB SSD recommended baseline
  • Linux VPS (Ubuntu 22.04+ recommended) or local machine with Docker Desktop
  • Domain + reverse proxy for production (80/443)

Security baseline:

  • Expose only 80/443 publicly
  • Keep 3000, 3001, and 5432 private
  • Use a strong BETTER_AUTH_SECRET

If you plan to use the built-in Caddy production setup, create your DNS record before starting the stack and wait until it resolves from public resolvers.

Want the fast path instead of following the manual steps below? Run:

./scripts/setup.sh

The install wizard handles env files, secrets, domains, Caddy, and Docker startup for a terminal-only VPS setup.

Clone Repository

git clone https://github.com/redpangilinan/testiment
cd testiment

Create Env Files

cp .env.example .env
cp apps/server/.env.example apps/server/.env
cp apps/web/.env.example apps/web/.env

Configure App Env

Root .env is Docker-only (ports, database mode, and bundled Postgres config).

App settings belong in:

  • apps/server/.env
  • apps/web/.env

For production, set these explicitly:

DATABASE_URL
BETTER_AUTH_SECRET
NEXT_PUBLIC_APP_URL
NEXT_PUBLIC_SERVER_URL
BETTER_AUTH_URL
CORS_ORIGINS
ENABLE_PAYMENTS (false)

For the supported Caddy deployment, set these to the same public origin:

NEXT_PUBLIC_APP_URL=https://app.example.com
NEXT_PUBLIC_SERVER_URL=https://app.example.com
BETTER_AUTH_URL=https://app.example.com
CORS_ORIGINS=https://app.example.com

Optional but recommended for security:

CAPTURE_SUBMIT_TOKEN_SECRET
UPSTASH_REDIS_REST_URL
UPSTASH_REDIS_REST_TOKEN
TURNSTILE_SITE_KEY
TURNSTILE_SECRET_KEY

Optional Google OAuth:

GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=true

Start Stack

Prebuilt images:

docker compose up -d

If you use an external PostgreSQL provider:

docker compose -f docker-compose.external-db.yml up -d

Production with built-in Caddy:

docker compose -f docker-compose.yml -f docker-compose.caddy.yml up -d

Before using the built-in Caddy setup, confirm public DNS propagation:

dig @1.1.1.1 +short app.example.com

The command should return your VPS public IP before you bring up the HTTPS stack.

Production with built-in Caddy and external PostgreSQL:

docker compose -f docker-compose.external-db.yml -f docker-compose.caddy.yml up -d

Validate Deployment

./scripts/healthcheck.sh

If you need live logs while debugging:

docker compose logs -f server
docker compose logs -f web

Schema migrations run automatically through the migrate service before server starts.

On this page