workspace-v1/control-plane/devtools/docker/templates/docker-compose.fullstack.yml
rckrdmrd 66161b1566 feat: Workspace-v1 complete migration with NEXUS v3.4
Sistema NEXUS v3.4 migrado con:

Estructura principal:
- core/orchestration: Sistema SIMCO + CAPVED (27 directivas, 28 perfiles)
- core/catalog: Catalogo de funcionalidades reutilizables
- shared/knowledge-base: Base de conocimiento compartida
- devtools/scripts: Herramientas de desarrollo
- control-plane/registries: Control de servicios y CI/CD
- orchestration/: Configuracion de orquestacion de agentes

Proyectos incluidos (11):
- gamilit (submodule -> GitHub)
- trading-platform (OrbiquanTIA)
- erp-suite con 5 verticales:
  - erp-core, construccion, vidrio-templado
  - mecanicas-diesel, retail, clinicas
- betting-analytics
- inmobiliaria-analytics
- platform_marketing_content
- pos-micro, erp-basico

Configuracion:
- .gitignore completo para Node.js/Python/Docker
- gamilit como submodule (git@github.com:rckrdmrd/gamilit-workspace.git)
- Sistema de puertos estandarizado (3005-3199)

Generated with NEXUS v3.4 Migration System
EPIC-010: Configuracion Git y Repositorios
2026-01-04 03:37:42 -06:00

125 lines
3.6 KiB
YAML

# ==============================================================================
# DOCKER COMPOSE TEMPLATE - FULLSTACK (BACKEND + FRONTEND)
# ==============================================================================
# Template completo para proyectos con backend y frontend
#
# USO:
# 1. Copiar a tu proyecto
# 2. Reemplazar placeholders:
# - {{PROJECT}} -> nombre del proyecto (ej: gamilit)
# - {{BACKEND_PORT}} -> puerto backend (ej: 3000)
# - {{FRONTEND_PORT}} -> puerto frontend (ej: 3001)
# - {{API_DOMAIN}} -> dominio API (ej: api.gamilit.localhost)
# - {{WEB_DOMAIN}} -> dominio Web (ej: gamilit.localhost)
# ==============================================================================
version: "3.8"
# Anchors reutilizables
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
x-healthcheck-backend: &healthcheck-backend
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
x-healthcheck-frontend: &healthcheck-frontend
interval: 60s
timeout: 5s
retries: 3
start_period: 10s
services:
# ==========================================================================
# BACKEND
# ==========================================================================
{{PROJECT}}-api:
build:
context: ../apps/backend
dockerfile: Dockerfile
container_name: {{PROJECT}}-api
restart: unless-stopped
expose:
- "{{BACKEND_PORT}}"
environment:
- NODE_ENV=${NODE_ENV:-development}
- PORT={{BACKEND_PORT}}
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL:-}
- JWT_SECRET=${JWT_SECRET}
- JWT_EXPIRES_IN=${JWT_EXPIRES_IN:-1d}
- LOG_LEVEL=${LOG_LEVEL:-info}
- CORS_ORIGIN=${CORS_ORIGIN:-http://{{WEB_DOMAIN}}}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:{{BACKEND_PORT}}/health"]
<<: *healthcheck-backend
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{PROJECT}}-api.rule=Host(`{{API_DOMAIN}}`)"
- "traefik.http.routers.{{PROJECT}}-api.entrypoints=web"
- "traefik.http.services.{{PROJECT}}-api.loadbalancer.server.port={{BACKEND_PORT}}"
networks:
- {{PROJECT}}_${ENV:-local}
- infra_shared
logging:
<<: *default-logging
# ==========================================================================
# FRONTEND
# ==========================================================================
{{PROJECT}}-web:
build:
context: ../apps/frontend
dockerfile: Dockerfile
args:
- REACT_APP_API_URL=http://{{API_DOMAIN}}
container_name: {{PROJECT}}-web
restart: unless-stopped
expose:
- "{{FRONTEND_PORT}}"
environment:
- NODE_ENV=${NODE_ENV:-development}
- REACT_APP_API_URL=${REACT_APP_API_URL:-http://{{API_DOMAIN}}}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:{{FRONTEND_PORT}}/"]
<<: *healthcheck-frontend
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{PROJECT}}-web.rule=Host(`{{WEB_DOMAIN}}`)"
- "traefik.http.routers.{{PROJECT}}-web.entrypoints=web"
- "traefik.http.services.{{PROJECT}}-web.loadbalancer.server.port={{FRONTEND_PORT}}"
networks:
- {{PROJECT}}_${ENV:-local}
- infra_shared
depends_on:
- {{PROJECT}}-api
logging:
<<: *default-logging
# ==============================================================================
# NETWORKS
# ==============================================================================
networks:
{{PROJECT}}_${ENV:-local}:
external: true
infra_shared:
external: true