Spaces:
Paused
Paused
| FROM nousresearch/hermes-agent:latest | |
| # 1. Installation de Node.js, npm, git, ffmpeg et pnpm | |
| USER root | |
| RUN apt-get update && \ | |
| apt-get install -y nodejs npm git curl ffmpeg && \ | |
| npm install -g pnpm && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # 2. Installation de Hermes Workspace | |
| RUN git clone https://github.com/NousResearch/hermes-workspace.git /opt/hermes-workspace | |
| WORKDIR /opt/hermes-workspace | |
| RUN pnpm install | |
| # 3. Préparation du répertoire de données | |
| RUN mkdir -p /opt/data/logs && chmod -R 777 /opt/data | |
| # 4. Script d'initialisation au boot (nettoyage des verrous + permissions) | |
| RUN mkdir -p /etc/cont-init.d && \ | |
| cat << 'EOF' > /etc/cont-init.d/99-fix-perms.sh | |
| #!/bin/sh | |
| rm -f /opt/data/*.lock /opt/data/*.db.init.lock | |
| mkdir -p /opt/data/logs | |
| chown -hR 10000:10000 /opt/data 2>/dev/null || true | |
| chmod -R 777 /opt/data 2>/dev/null || true | |
| EOF | |
| RUN chmod +x /etc/cont-init.d/99-fix-perms.sh | |
| # 5. Script de démarrage | |
| RUN cat << 'EOF' > /usr/local/bin/start-hermes.sh | |
| #!/bin/bash | |
| set -e | |
| echo "Starting Hermes Gateway..." | |
| gateway run & | |
| echo "Starting Hermes Workspace..." | |
| cd /opt/hermes-workspace | |
| pnpm dev | |
| EOF | |
| RUN chmod +x /usr/local/bin/start-hermes.sh | |
| # 6. Configuration Gateway & Dashboard | |
| ENV HERMES_HOME=/opt/data \ | |
| HOME=/opt/data \ | |
| HERMES_DASHBOARD=1 \ | |
| HERMES_DASHBOARD_HOST=0.0.0.0 \ | |
| HERMES_DASHBOARD_PORT=7860 \ | |
| API_SERVER_ENABLED=true \ | |
| API_SERVER_HOST=0.0.0.0 \ | |
| API_SERVER_PORT=8642 | |
| # 7. Activation des messageries | |
| ENV TELEGRAM_ENABLED=true \ | |
| WHATSAPP_ENABLED=false \ | |
| DISCORD_ENABLED=false \ | |
| SLACK_ENABLED=false \ | |
| MATRIX_ENABLED=false | |
| # Telegram | |
| # ENV TELEGRAM_BOT_TOKEN="xxxxxxxx" | |
| # ENV TELEGRAM_ALLOWED_USERS="xxxxxxxx" | |
| # 8. Sécurité | |
| ENV HERMES_TOOL_LOOP_HARD_STOP_ENABLED=true \ | |
| HERMES_TOOL_LOOP_EXACT_FAILURE_LIMIT=5 \ | |
| HERMES_TOOL_LOOP_IDEMPOTENT_LIMIT=5 \ | |
| HERMES_LOG_LEVEL=INFO | |
| EXPOSE 7860 | |
| EXPOSE 8642 | |
| EXPOSE 3000 | |
| WORKDIR /opt/data | |
| CMD ["/usr/local/bin/start-hermes.sh"] |