Deployment Guide¶
Complete guide to deploying the Portugal Odyssey platform across different environments.
Overview¶
The platform supports deployment to three environments: - Development - Local development - Qualification - Staging/testing environment - Production - Live production environment
Quick Start¶
Development Deployment¶
Qualification Deployment¶
Production Deployment¶
Deployment Methods¶
1. Local Development¶
Purpose: Local development with hot reload
Commands:
make dev # Start development stack
make dev-build # Rebuild and start
make dev-logs # View logs
make dev-stop # Stop services
See: Local Setup Guide
2. VPS Deployment (SSH-based)¶
Purpose: Deploy to remote VPS servers
Prerequisites:
- .env.deploy file configured (see .env.deploy.example)
- SSH access to VPS
- Docker installed on VPS
Commands:
# Qualification
make deploy-vps-qual SERVICE=service-name TAG=latest
# Production
make deploy-vps-prod SERVICE=service-name TAG=latest
See: VPS Deployment Guide
3. CI/CD Pipeline¶
Purpose: Automated deployment via GitLab CI/CD
Triggers:
- Push to main → Automatic qualification deployment
- Manual trigger → Production deployment (requires approval)
See: CI/CD Pipeline Guide
Environment Configuration¶
Each environment requires specific configuration:
- Development:
.env.dev - Qualification:
.env.qual(on VPS) - Production:
.env.prod(on VPS)
See: Environment Configuration
Deployment Workflow¶
Standard Deployment¶
-
Build Images
-
Deploy to Qualification
-
Verify Deployment
-
Deploy to Production (after qualification testing)
Rollback Procedure¶
-
Identify Previous Tag
-
Deploy Previous Version
-
Verify Rollback
Health Checks¶
Qualification¶
Production¶
Monitoring Deployments¶
View Logs¶
# Qualification
make qual-logs
# Production
make prod-logs
# Specific service
ssh root@qual.portugalodyssey.pt "docker logs po-service-name-qual --tail=50"
Check Service Status¶
Troubleshooting¶
Deployment Failures¶
-
Check SSH Access
-
Verify Environment File
-
Check Docker Resources
Service Not Starting¶
-
Check Logs
-
Verify Environment Variables
-
Check Dependencies
Best Practices¶
- Always test in qualification first
- Monitor deployments - Watch logs during deployment
- Verify health checks - Ensure services are healthy after deployment
- Keep backups - Backup databases before major deployments
- Document changes - Note any configuration changes
See Also¶
- Environment Configuration
- CI/CD Pipeline
- VPS Deployment Guide
- Infrastructure Guide