Operations Guide
This section covers operational procedures for deploying, maintaining, and scaling the Odoo 15 ERP system in production environments.
Infrastructure Overview
flowchart TB
subgraph "Internet"
Users[Users/Browsers]
Mobile[Mobile Devices]
end
subgraph "AWS Cloud"
subgraph "Compute"
EC2[EC2 / Lightsail<br/>Docker Host]
end
subgraph "Database"
RDS[(PostgreSQL RDS<br/>Managed Database)]
end
subgraph "Storage"
S3[S3 Bucket<br/>Signatures/Photos]
Backups[S3 Bucket<br/>Backups]
end
end
subgraph "Docker Containers"
Nginx[Nginx<br/>SSL Termination]
Odoo[Odoo 15<br/>:8069]
PWA[Field PWA<br/>:8000]
Landing[Landing Page<br/>:8001]
Docs[Documentation<br/>:8002]
end
Users --> Nginx
Mobile --> Nginx
Nginx --> Odoo
Nginx --> PWA
Nginx --> Landing
Nginx --> Docs
Odoo --> RDS
Odoo --> S3
PWA --> S3
Odoo -.->|Backup| Backups
Deployment Script
All operations use the centralized production_deploy.sh script, which reads configuration from .env:
# View current configuration
./production_deploy.sh config
# View all available commands
./production_deploy.sh help
Quick Reference
| Category |
Command |
Description |
| Deployment |
deploy |
Full deployment (backup, pull, build, update modules) |
|
update |
Quick update (backup, pull, rebuild, update modules) |
|
update-module NAME |
Update specific Odoo module |
| Services |
start |
Start all services |
|
stop |
Stop all services |
|
restart |
Restart all services |
|
restart-service NAME |
Restart specific service |
|
status |
Check service status |
|
logs [SERVICE] |
View logs |
|
health |
Run health checks |
| Rebuild |
rebuild-all |
Rebuild all containers |
|
rebuild-pwa |
Rebuild PWA only |
|
rebuild-landing |
Rebuild Landing Page only |
|
rebuild-docs |
Rebuild Documentation only |
| SSL |
init-ssl |
Full SSL setup |
|
renew-ssl |
Renew certificates |
|
configure-nginx |
Generate nginx config |
| Maintenance |
backup |
Create full backup |
|
db-shell |
PostgreSQL shell |
|
odoo-shell |
Odoo shell |
| Info |
config |
Show current configuration |
|
help |
Show all commands |
Environment Configuration
The .env file is the single source of truth for all system configuration:
| Environment |
COMPOSE_FILE |
Database |
Ports |
| Test |
docker-compose.yml:docker-compose.test.yml |
Local PostgreSQL |
All exposed |
| Production |
docker-compose.yml:docker-compose.prod.yml |
AWS RDS |
Only 80, 443 |
See Configuration Guide for complete environment variable reference.
Operational Checklists
Daily Operations
Weekly Operations
Monthly Operations
Health Monitoring
Service Health Endpoints
| Service |
Endpoint |
Expected Response |
| Nginx |
/nginx-health |
200 OK |
| Odoo |
/web/health |
200 OK |
| PWA |
/api/health |
{"status": "ok"} |
| Landing |
/health |
{"status": "ok"} |
Quick Health Check
# Run all health checks
./production_deploy.sh health
# Check individual service
curl -s http://localhost/nginx-health
curl -s http://localhost:8016/web/health
curl -s http://localhost:8000/api/health
Common Operations
Start/Stop Services
# Start all services
./production_deploy.sh start
# Stop all services
./production_deploy.sh stop
# Restart all services
./production_deploy.sh restart
# Restart specific service
./production_deploy.sh restart-service odoo
./production_deploy.sh restart-service nginx
./production_deploy.sh restart-service pwa
View Logs
# All services
./production_deploy.sh logs
# Specific service
./production_deploy.sh logs odoo
./production_deploy.sh logs nginx
# With filtering
./production_deploy.sh logs odoo | grep -i error
Database Access
# PostgreSQL shell
./production_deploy.sh db-shell
# Odoo shell
./production_deploy.sh odoo-shell
# Example: Check user count
>>> env['res.users'].search_count([])
Section Guides
Deployment & Configuration
| Guide |
Description |
| Deployment |
Complete deployment procedures using production_deploy.sh |
| Backup & Recovery |
Backup strategies, S3 storage, and restoration |
Infrastructure
| Guide |
Description |
| Server Maintenance |
Ubuntu server maintenance, security updates, firewall |
| Monitoring |
Health monitoring, metrics, and alerting |
| Security |
Security hardening and best practices |
| Scaling |
Multi-company setup and horizontal scaling |
Email Configuration
Reference
| Guide |
Description |
| Governance |
Documentation standards and review process |
Troubleshooting Quick Reference
Service Won't Start
# Check logs for errors
./production_deploy.sh logs <service>
# Check container status
./production_deploy.sh status
# Force recreate container
docker compose up -d --force-recreate <service>
Database Connection Issues
# Test database connection
docker compose exec odoo python3 -c "import psycopg2; print('OK')"
# Check database config
./production_deploy.sh config
# Verify database exists
docker compose exec db psql -U $DB_USER -l
SSL Certificate Issues
# Test nginx config
docker compose exec nginx nginx -t
# Check certificate files
ls -la nginx/ssl/live/*/
# Request new certificates
./production_deploy.sh init-ssl-request
Nginx Issues
# Test configuration
docker compose exec nginx nginx -t
# Reload configuration
docker compose exec nginx nginx -s reload
# View nginx logs
./production_deploy.sh logs nginx
See Troubleshooting Guide for comprehensive issue resolution.