docs: add comprehensive documentation

- Add README.md with project overview, features, quick start guide,
  project structure, environment variables, and scripts
- Add docs/API.md with complete API reference for all endpoints
- Add docs/DEPLOYMENT.md with production deployment guide covering
  PM2, Nginx, SSL, and Docker options
- Add docker-compose.yml for containerized deployment
- Add Dockerfile with multi-stage build for optimized production image
- Add .dockerignore for efficient Docker builds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ivan
2026-02-01 07:49:33 +00:00
parent df7660f37d
commit 864902df81
6 changed files with 2401 additions and 0 deletions

61
docker-compose.yml Normal file
View File

@@ -0,0 +1,61 @@
version: '3.8'
services:
# Base de datos PostgreSQL
db:
image: postgres:16-alpine
container_name: padel-pro-db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-padel_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-padel_password}
POSTGRES_DB: ${POSTGRES_DB:-padel_pro}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-padel_user} -d ${POSTGRES_DB:-padel_pro}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- padel-network
# Aplicacion Web Next.js
web:
build:
context: .
dockerfile: Dockerfile
container_name: padel-pro-web
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
NODE_ENV: production
DATABASE_URL: postgresql://${POSTGRES_USER:-padel_user}:${POSTGRES_PASSWORD:-padel_password}@db:5432/${POSTGRES_DB:-padel_pro}?schema=public
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
ports:
- "3000:3000"
volumes:
- ./apps/web/public:/app/apps/web/public:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/auth/session"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- padel-network
networks:
padel-network:
driver: bridge
volumes:
postgres_data:
driver: local