Deploying Módulo Horario requires coordinating four microservices —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Luisanchez0/modulo_Horario/llms.txt
Use this file to discover all available pages before exploring further.
usuarios-service, materias-service, aulas-service, and horario-service — along with MySQL, PostgreSQL, an Nginx reverse proxy, and SSL certificates. This guide walks you through every step in the order you should perform them.
Pre-deployment checklist
Before touching any server, confirm every item below is complete.- All tests passing in CI
- All secrets rotated (JWT_SECRET, ADMIN_CREATION_KEY, INTERNAL_API_KEY, database passwords)
- HTTPS/SSL configured and certificate issued
- Rate limiting enabled in Nginx for
/auth/login(5 req/min) and API endpoints (100 req/min) - Firewall rules applied — only ports 80 and 443 exposed externally
- Centralized logging configured (ELK Stack or CloudWatch)
- Database backup completed before deployment
- Monitoring (Prometheus + Grafana) configured and alerting
Generate production secrets
Generate cryptographically random values for every secret. Never reuse development values.Store the generated values in AWS Secrets Manager (recommended) rather than a
.env file.Build and start all services
Copy the root environment template and fill in your generated secrets before building.Build all four service images and start them in detached mode.Confirm all containers started without errors.
Verify health endpoints
Each service exposes a Each should respond with
GET /health endpoint. All four must return 200 OK before proceeding.{"status": "ok"} or a similar success payload. If any service returns an error, inspect its logs before continuing.Configure Nginx reverse proxy with SSL
Install Nginx and Certbot, then write the following configuration to
/etc/nginx/nginx.conf. This configuration enforces HTTPS, proxies all four services, applies rate limiting, and sets security headers.Obtain an SSL certificate with Let's Encrypt
Install Certbot and issue a certificate for your domain. The Enable automatic renewal so certificates never expire.Restart Nginx after the certificate is in place.
--standalone flag temporarily binds to port 80, so run this before starting Nginx, or use --nginx if Nginx is already running.Set up the production database
Módulo Horario uses PostgreSQL for Update
horario-service and materias-service, and MySQL for usuarios-service and aulas-service. For production, use managed database instances rather than the containers bundled in docker-compose.yml.DATABASE_URL in your secrets store to point to the new RDS endpoint before restarting services.Post-launch verification
After everything is running, complete the following checks before declaring the deployment successful.Before go-live:
- All four health endpoints return
200 OKthrough the Nginx proxy (HTTPS) - Login returns a JWT token at
POST /auth/login - Security scan completed (OWASP ZAP or equivalent)
- Load test passed:
ab -n 1000 -c 10 https://api.yourdomain.com/horarios - Automated database backup configured
- Monitoring alerts are firing correctly
- Rollback runbook available and tested
- On-call rotation configured
- Monitor CPU, memory, and request latency
- Review logs hourly for the first 24 hours, then daily
- Confirm rate limiting is blocking excess requests on
/auth/login - Plan scaling if load increases beyond tested thresholds