e4866c6dee
- Add SAM (Sistema de Administración Académica) integration with sync endpoints - Add deployment automation (deploy.sh, remote-setup.sh, setup-nginx-ssl.sh) - Add nginx proxy configuration for SSL with Let's Encrypt - Add audio response support for student lessons (migrations, handlers) - Add audio evaluations admin page - Update CORS to support wildcard subdomains for norteamericano.cl - Add comprehensive deployment documentation (DESPLIEGUE.md, ManualDeConfiguracion.md) - Update docker-compose.yml with nginx-proxy and acme-companion services - Remove outdated documentation files Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
136 lines
3.7 KiB
YAML
136 lines
3.7 KiB
YAML
# OpenCCB Docker Compose - Producción con SSL
|
|
# Servidor: AWS EC2 us-east-2
|
|
# Dominios: studio.norteamericano.com y learning.norteamericano.com
|
|
# Usa nginx-proxy + acme-companion para SSL automático con Let's Encrypt
|
|
|
|
services:
|
|
# ========================================
|
|
# NGINX Proxy + SSL (Let's Encrypt)
|
|
# ========================================
|
|
nginx-proxy:
|
|
image: nginxproxy/nginx-proxy:1.4
|
|
container_name: nginx-proxy
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
- certs:/etc/nginx/certs:ro
|
|
- vhost:/etc/nginx/vhost.d
|
|
- html:/usr/share/nginx/html
|
|
- ./nginx/proxy.conf:/etc/nginx/conf.d/proxy.conf:ro
|
|
restart: always
|
|
networks:
|
|
- openccb-network
|
|
|
|
acme-companion:
|
|
image: nginxproxy/acme-companion:2.2
|
|
container_name: acme-companion
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- certs:/etc/nginx/certs:rw
|
|
- vhost:/etc/nginx/vhost.d
|
|
- html:/usr/share/nginx/html
|
|
- ./nginx/certs-data:/etc/acme.sh:rw
|
|
environment:
|
|
- DEFAULT_EMAIL=admin@norteamericano.com
|
|
- NGINX_PROXY_CONTAINER=nginx-proxy
|
|
- LETSENCRYPT_STAGING=${LETSENCRYPT_STAGING:-true}
|
|
depends_on:
|
|
- nginx-proxy
|
|
restart: always
|
|
networks:
|
|
- openccb-network
|
|
|
|
# ========================================
|
|
# Base de Datos
|
|
# ========================================
|
|
db:
|
|
image: pgvector/pgvector:pg16
|
|
container_name: openccb-db
|
|
environment:
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
|
POSTGRES_DB: openccb
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- openccb-network
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U user"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ========================================
|
|
# Studio + CMS (HTTPS)
|
|
# ========================================
|
|
studio:
|
|
build:
|
|
context: .
|
|
dockerfile: web/studio/Dockerfile
|
|
args:
|
|
NEXT_PUBLIC_CMS_API_URL: http://studio.norteamericano.com
|
|
NEXT_PUBLIC_LMS_API_URL: http://learning.norteamericano.com
|
|
container_name: openccb-studio
|
|
environment:
|
|
- VIRTUAL_HOST=studio.norteamericano.com
|
|
- VIRTUAL_PORT=3000
|
|
- LETSENCRYPT_HOST=studio.norteamericano.com
|
|
- LMS_INTERNAL_URL=http://experience:3002
|
|
- NEXT_PUBLIC_LMS_API_URL=http://learning.norteamericano.com
|
|
volumes:
|
|
- uploads_data:/app/uploads
|
|
env_file: .env
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
- "t-800:192.168.0.5"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- openccb-network
|
|
restart: always
|
|
|
|
# ========================================
|
|
# Experience + LMS
|
|
# ========================================
|
|
experience:
|
|
build:
|
|
context: .
|
|
dockerfile: web/experience/Dockerfile
|
|
args:
|
|
NEXT_PUBLIC_LMS_API_URL: http://learning.norteamericano.com
|
|
NEXT_PUBLIC_CMS_API_URL: http://studio.norteamericano.com
|
|
container_name: openccb-experience
|
|
environment:
|
|
- VIRTUAL_HOST=learning.norteamericano.com
|
|
- VIRTUAL_PORT=3003
|
|
- LETSENCRYPT_HOST=learning.norteamericano.com
|
|
- NEXT_PUBLIC_CMS_API_URL=http://studio.norteamericano.com
|
|
env_file: .env
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
- "t-800:192.168.0.5"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- openccb-network
|
|
restart: always
|
|
|
|
# ========================================
|
|
# Volúmenes y Redes
|
|
# ========================================
|
|
volumes:
|
|
postgres_data:
|
|
uploads_data:
|
|
certs:
|
|
vhost:
|
|
html:
|
|
|
|
networks:
|
|
openccb-network:
|
|
driver: bridge
|