Agregar soporte para múltiples instancias en la configuración del proyecto, actualizando .env.example, README.md, docker-compose.yml y creando MULTI_INSTANCIAS.md

This commit is contained in:
2025-12-07 12:19:31 -05:00
parent 70f94c8897
commit 8a5d891352
4 changed files with 369 additions and 25 deletions

View File

@@ -1,8 +1,11 @@
---
# Multi-instance compatible Docker Compose configuration
# Para ejecutar múltiples instancias: docker-compose -f docker-compose.yml -p instancia1 up -d
services:
odengin:
build: ./engine
container_name: odengin
container_name: ${COMPOSE_PROJECT_NAME:-onedrive}-odengin
env_file: .env
environment:
- E5_CLIENT_ID=${E5_CLIENT_ID}
@@ -11,27 +14,34 @@ services:
- WEB_APP_PASSWORD=${WEB_APP_PASSWORD}
- E5_WEB_APP_PASSWORD=${E5_WEB_APP_PASSWORD}
ports:
- "8089:8080"
- "${ENGINE_PORT:-8089}:8080"
restart: unless-stopped
hostname: odengin
hostname: ${COMPOSE_PROJECT_NAME:-onedrive}-odengin
networks:
- odeng-net
- ${COMPOSE_PROJECT_NAME:-onedrive}-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
odcron:
build: ./cron
container_name: odcron
container_name: ${COMPOSE_PROJECT_NAME:-onedrive}-odcron
env_file: .env
environment:
- IP=${CRON_IP:-odengin:8080}
- IP=${CRON_IP:-${COMPOSE_PROJECT_NAME:-onedrive}-odengin:8080}
- PASSWORD=${CRON_PASSWORD}
- REFRESH_TOKEN=${CRON_REFRESH_TOKEN}
restart: unless-stopped
hostname: odcron
hostname: ${COMPOSE_PROJECT_NAME:-onedrive}-odcron
networks:
- odeng-net
- ${COMPOSE_PROJECT_NAME:-onedrive}-net
depends_on:
- odengin
odengin:
condition: service_healthy
networks:
odeng-net:
${COMPOSE_PROJECT_NAME:-onedrive}-net:
driver: bridge