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
| Type | Service | Image / Source | Port | Description |
|---|---|---|---|---|
| Persistent | web | ghcr.io/chenhaonan-eth/ugcad-web:<tag> | 3000→3000 | Frontend dashboard + API routes |
| Persistent | agents | ghcr.io/chenhaonan-eth/ugcad-agents:<tag> | 8000 (internal) | LangGraph API server |
| Persistent | redis | redis:7-alpine | 6379 (internal) | Cache and task queues |
| Database | PostgreSQL | Dokploy Databases in production / legacy-postgres profile for local or short rollback windows | 5432 (internal) | Business data via DATABASE_URL; LangGraph runtime via LANGGRAPH_DATABASE_URL |
| One-off job | migrations | ghcr.io/chenhaonan-eth/ugcad-migrations:<tag> | none | Initializes or evolves the business schema from SQL migrations |
| One-off job | rbac-init | ghcr.io/chenhaonan-eth/ugcad-rbac-init:<tag> | none | Initializes 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.
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.
Required Environment Variables
The production Dokploy path requires these secrets and connection strings:
| Variable | Description | Example |
|---|---|---|
DATABASE_URL | Business PostgreSQL logical database URL | copied from Dokploy Databases |
LANGGRAPH_DATABASE_URL | LangGraph runtime PostgreSQL logical database URL | copied from Dokploy Databases |
REDIS_PASSWORD | Redis password | openssl rand -hex 20 |
AUTH_SECRET | NextAuth signing secret (≥32 chars) | openssl rand -base64 32 |
AGENTS_SHARED_SECRET | Inter-service auth token | openssl rand -hex 20 |
OPENAI_API_KEY | LLM provider key | sk-... |
NEXT_PUBLIC_APP_URL | Public URL of the web app | https://yourdomain.com |