Installation
A comprehensive guide to installing the CodeArcade Community Engine for both development and production.
Local Development (Manual Setup)
If you prefer not to use Docker for your infrastructure, you can set it up manually.
1. Database Database
Ensure you have a PostgreSQL server running locally or on a cloud provider like Supabase or Neon.
Update your .env:
DATABASE_URL="postgresql://username:password@host:port/database"2. Redis Cache & Queues
You’ll need an instance of Redis to handle background jobs, notifications, and caching. Upstash provides a great serverless option.
REDIS_URL="redis://username:password@host:port"3. S3 Storage (Required for image uploads)
Set up an AWS S3 bucket (or S3-compatible storage like Cloudflare R2 / MinIO).
S3_REGION="us-east-1"
S3_ACCESS_KEY="your-access-key"
S3_SECRET_KEY="your-secret-key"
S3_BUCKET_NAME="community-uploads"
S3_ENDPOINT="https://s3.amazonaws.com"4. Build and Start
npm install
npx prisma generate
npx prisma migrate deploy
npm run build
npm run startDeploying with Docker Compose (Production)
For complete control over your infrastructure, you can deploy the entire stack using Docker Compose. Make sure your .env is tailored for production with strong secrets before running this.
version: '3.8'
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
web:
build: .
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
depends_on:
- db
- redis
volumes:
postgres_data:
redis_data:docker-compose -f docker-compose.prod.yml up -dCloud Deployment Tips
Vercel
Deploying the community engine on Vercel is seamless since it’s a Next.js App Router application.
- Import the GitHub repository into your Vercel dashboard.
- Add all environment variables.
- Configure your build command to
npx prisma generate && next build. - Deploy!
Render / Railway
If you want to keep your application and database in the same network, Render and Railway offer excellent out-of-the-box PostgreSQL and Redis addons. Just instantiate them, link them to a Node Web Service, and supply the connection strings to the .env.