docs: update documentation for Phase 3.7 changes

- Update README.md with beta features, seed commands, resource limits
- Update SESSION_CONTEXT.md with Phase 3.7 changelog and new structure
- Update DEPLOYMENT.md with seeding instructions and resource requirements
- Document Makefile commands, environment reorganization, footer changes
- Update test accounts to use @spotlight.cam domain
- Add production resource allocation table (4 CPU / 8GB server)
- Last updated: 2025-12-06
This commit is contained in:
Radosław Gierwiało
2025-12-06 12:33:01 +01:00
parent e1fabeb297
commit d98222da12
3 changed files with 223 additions and 55 deletions

View File

@@ -32,7 +32,16 @@ docker compose --profile dev up -d
docker compose exec backend npx prisma migrate deploy
```
5. **Access the application**
5. **Seed the database**
```bash
# Development environment - includes test users, events, heats
make seed-dev
# Or use npm directly
docker compose exec backend npm run prisma:seed:dev
```
6. **Access the application**
- Frontend: http://localhost:8080
- Backend API: http://localhost:8080/api
- Database: localhost:5432
@@ -91,9 +100,53 @@ docker compose --profile prod up -d
6. **Run migrations**
```bash
docker compose --profile prod exec backend-prod npx prisma migrate deploy
docker compose exec backend-prod npx prisma migrate deploy
```
7. **Seed production database**
```bash
# Production environment - admin user + divisions + competition types only
make seed-prod
# Or use npm directly
docker compose exec backend-prod npm run prisma:seed:prod
```
**Important:** Production seed creates:
- Admin account: admin@spotlight.cam (COMFORT tier, isAdmin flag)
- Divisions: Newcomer, Novice, Intermediate, Advanced, All-Star, Champion
- Competition Types: Jack & Jill, Strictly
**No test users or events are created in production.**
---
## Server Resource Requirements
### Recommended Server Specs
- **CPU:** 4 cores minimum
- **RAM:** 8GB minimum
- **Disk:** 50GB SSD (includes OS, Docker images, database)
### Resource Allocation (Production)
Docker containers configured for 4 CPU / 8GB server:
| Service | CPU Limit | CPU Reserved | Memory Limit | Memory Reserved |
|---------|-----------|--------------|--------------|-----------------|
| nginx-prod | 0.5 | 0.25 | 512M | 256M |
| frontend-prod | 0.5 | 0.25 | 512M | 256M |
| backend-prod | 1.5 | 1.0 | 2G | 1G |
| db-prod | 1.0 | 0.75 | 3G | 2G |
| **Total** | **3.5** | **2.25** | **6GB** | **3.5GB** |
Leaves ~0.5 CPU and ~2GB RAM for host system operations.
**Notes:**
- Limits allow bursting during peak traffic
- Reservations guarantee minimum resources
- PostgreSQL gets most memory for query caching
- Backend gets most CPU for Socket.IO and matching algorithm
---
## Environment Configuration