# Dockerfile para Hermes (Python)
FROM python:3.12-slim

WORKDIR /app

# Instalar dependencias del sistema
RUN apt-get update && apt-get install -y \
    git \
    curl \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Instalar Hermes
RUN pip install --no-cache-dir "hermes-agent[messaging,cron,web]"

# Instalar dependencias adicionales
RUN pip install --no-cache-dir \
    flask \
    requests \
    xmlrpc.client

# Copiar plugins y skills
COPY hermes/plugins/ /root/.hermes/plugins/
COPY hermes/skills/ /skills/
COPY hermes/workspace/ /root/.hermes/workspace/
COPY hermes/config.yaml /root/.hermes/config.yaml
COPY hermes/webhooks/ /app/webhooks/

# Exponer puertos
EXPOSE 8080

# Comando de inicio
CMD ["hermes", "gateway", "start"]
