AI Startup Analyzer ships with two Docker Compose configurations: a lightweight development file that spins up only the stateful services (PostgreSQL and Redis) so you can run the backend and frontend natively, and a full production file that builds and orchestrates every container together. Both configurations use official Alpine-based images and include health checks so dependent services wait for their dependencies to be ready before starting.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Abbaddii-99/AI-Startup-Analyzer/llms.txt
Use this file to discover all available pages before exploring further.
Local Development
In development the recommended workflow is to use Docker only for the infrastructure services — PostgreSQL and Redis — while running the NestJS backend and Next.js frontend directly on your machine withpnpm dev. This lets you take advantage of hot-reloading and fast TypeScript compilation without rebuilding images on every change.
git clone https://github.com/Abbaddii-99/AI-Startup-Analyzer.git
cd AI-Startup-Analyzer
pnpm install
Open
.env and fill in your DATABASE_URL, DIRECT_DATABASE_URL, and any AI API keys. The default values for REDIS_HOST, REDIS_PORT, BACKEND_PORT, and FRONTEND_URL match the Docker Compose service definitions and work without changes for local development.This command starts the two services defined in
docker-compose.yml and leaves them running in the background. Both containers expose their standard ports to localhost and persist data in named volumes.version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: ai-analyzer-postgres
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: ai_analyzer
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: ai-analyzer-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
redis_data:
Production Deployment
The production Docker Compose file (docker-compose.prod.yml) builds the backend and frontend from their respective multi-stage Dockerfiles and runs the entire stack — Redis, backend, and frontend — as a coordinated set of containers inside a dedicated bridge network. PostgreSQL is intentionally omitted from the production Compose file because the production stack is designed to connect to an external managed database such as Neon.
DATABASE_URLDIRECT_DATABASE_URLREDIS_PASSWORDJWT_SECRETGEMINI_API_KEYOPENROUTER_API_KEYFRONTEND_URLhttps://app.example.comBACKEND_URLNEXT_PUBLIC_API_URLDocker Compose will build the backend and frontend images, then start the containers in dependency order: Redis first, then the backend once Redis is healthy, and finally the frontend once the backend is running.
Port Mappings
| Service | Container Port | Host Port |
|---|---|---|
| Backend (NestJS API) | 4000 | 4000 |
| Frontend (Next.js) | 3000 | 3000 |
| PostgreSQL | 5432 | 5432 |
| Redis | 6379 | 6379 |
Automatic Database Migrations
The backend container’s startup command runsprisma migrate deploy before launching the NestJS API server. This means every time the backend container starts it applies any pending committed migrations to the database automatically — no manual migration step is needed after a deployment.
The relevant section of apps/backend/Dockerfile is: