# Petmaster CRM - Docker Compose Setup ## Quick Start Start all services: docker compose up --build Or detached mode: docker compose up -d --build Services will be available at: - Frontend: http://localhost:3001 - API: http://localhost:3000 - API Docs: http://localhost:3000/api/docs - PostgreSQL: localhost:5432 ## Configuration Copy and configure environment: cp .env.example .env cp api/.env.example api/.env Edit .env with your settings: STRIPE_SECRET_KEY=sk_live_your_key_here JWT_SECRET=your_secure_secret ## Stop Services Remove containers: docker compose down Remove containers and volumes: docker compose down -v ## Database Run migrations manually: docker compose exec api npx prisma migrate dev --name init Seed the database: docker compose exec api npx prisma db seed ## Development The API has hot-reload enabled via volume mount (./api/src:/app/src). Changes to TypeScript files will automatically restart the NestJS server. The frontend uses react-scripts for development with hot reload. ## Production For production deployment: 1. Set production environment variables 2. Use multi-stage Docker builds (already configured) 3. Consider adding: - Reverse proxy (nginx/traefik) - SSL certificates (Let's Encrypt) - Redis for WebSocket scaling - SMTP for email notifications - Stripe webhook endpoint