Deployment

Deployment Overview

How to deploy Makeugcads — choose local dev or production

Makeugcads is a pnpm monorepo. Production deployment is made of persistent runtime services, one-off deployment jobs, and environment-specific PostgreSQL.

Services

TypeServiceImage / SourcePortDescription
Persistentwebghcr.io/chenhaonan-eth/ugcad-web:<tag>3000→3000Frontend dashboard + API routes
Persistentagentsghcr.io/chenhaonan-eth/ugcad-agents:<tag>8000 (internal)LangGraph API server
Persistentredisredis:7-alpine6379 (internal)Cache and task queues
DatabasePostgreSQLDokploy Databases in production / legacy-postgres profile for local or short rollback windows5432 (internal)Business data via DATABASE_URL; LangGraph runtime via LANGGRAPH_DATABASE_URL
One-off jobmigrationsghcr.io/chenhaonan-eth/ugcad-migrations:<tag>noneInitializes or evolves the business schema from SQL migrations
One-off jobrbac-initghcr.io/chenhaonan-eth/ugcad-rbac-init:<tag>noneInitializes RBAC base data after migrations complete

Deployment Options

Local Development

Run the stack with Docker Compose. Enable the legacy-postgres profile explicitly when you need embedded PostgreSQL locally.

Docker Compose guide

Production

Deploy to your own VPS using Dokploy, a self-hosted PaaS that manages Docker Compose services with automatic HTTPS, rolling deploys, and environment variable management. Production PostgreSQL should come from Dokploy Databases and be injected through standard PostgreSQL URLs.

Dokploy guide

Required Environment Variables

The production Dokploy path requires these secrets and connection strings:

VariableDescriptionExample
DATABASE_URLBusiness PostgreSQL logical database URLcopied from Dokploy Databases
LANGGRAPH_DATABASE_URLLangGraph runtime PostgreSQL logical database URLcopied from Dokploy Databases
REDIS_PASSWORDRedis passwordopenssl rand -hex 20
AUTH_SECRETNextAuth signing secret (≥32 chars)openssl rand -base64 32
AGENTS_SHARED_SECRETInter-service auth tokenopenssl rand -hex 20
OPENAI_API_KEYLLM provider keysk-...
NEXT_PUBLIC_APP_URLPublic URL of the web apphttps://yourdomain.com