feat: Docker Compose + Codespaces setup — one command to run everything

This commit is contained in:
outsourc-e
2026-03-18 13:25:10 -04:00
parent 51263f9778
commit fc3f64880e
7 changed files with 99 additions and 55 deletions

View File

@@ -0,0 +1,9 @@
{
"name": "Hermes Workspace",
"dockerComposeFile": "../docker-compose.yml",
"service": "hermes-workspace",
"workspaceFolder": "/app",
"overrideCommand": false,
"forwardPorts": [3000, 8642],
"postCreateCommand": "echo 'Set ANTHROPIC_API_KEY in .env to get started'"
}

View File

@@ -1,22 +1,5 @@
node_modules
.next
dist
.output
releases
tmp
research
.env
.env.local
.env.*.local
.git
.gitignore
.vscode
.idea
*.md
!README.md
!CONTRIBUTING.md
!SECURITY.md
LICENSE
Dockerfile
docker-compose.yml
.dockerignore
.env

View File

@@ -1,26 +1 @@
# Hermes Workspace Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# HERMES BACKEND (Required)
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Hermes FastAPI backend URL
# Default: http://127.0.0.1:8642
HERMES_API_URL=http://127.0.0.1:8642
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# HERMES WORKSPACE ACCESS CONTROL (Optional)
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Password-protect Hermes Workspace web interface
# Leave empty for no authentication (default for local use)
# Set this for production deployments
# HERMES_PASSWORD=
# Allow access from non-localhost addresses
# Comma-separated list of hostnames/IPs
# Examples:
# - Tailscale: my-server.tail1234.ts.net
# - LAN: 192.168.1.50
# HERMES_ALLOWED_HOSTS=
ANTHROPIC_API_KEY=your-key-here

View File

@@ -85,7 +85,8 @@ hermes webapi
git clone https://github.com/outsourc-e/hermes-workspace.git
cd hermes-workspace
pnpm install
cp .env.example .env # Add your Hermes API URL
cp .env.example .env
printf '\nHERMES_API_URL=http://127.0.0.1:8642\n' >> .env
pnpm dev # Starts on http://localhost:3000
```
@@ -94,6 +95,9 @@ pnpm dev # Starts on http://localhost:3000
### Environment Variables
```env
# Anthropic key for Hermes Agent (optional for demo mode, required for chat)
ANTHROPIC_API_KEY=your-key-here
# Hermes FastAPI backend URL
HERMES_API_URL=http://127.0.0.1:8642
@@ -103,6 +107,28 @@ HERMES_API_URL=http://127.0.0.1:8642
---
## 🐳 Docker Quickstart
[![Open in GitHub Codespaces](https://img.shields.io/badge/GitHub%20Codespaces-Open-181717?logo=github)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=outsourc-e/hermes-workspace)
### Prerequisites
- **Docker**
- **Docker Compose**
```bash
git clone https://github.com/outsourc-e/hermes-workspace.git
cd hermes-workspace
echo 'ANTHROPIC_API_KEY=sk-ant-xxx' > .env
docker compose up
```
Open `http://localhost:3000`.
> **Note:** Set your API key in `.env` — workspace works in demo mode without one but chat requires a valid key.
---
## 📱 Install as App (Recommended)
Hermes Workspace is a **Progressive Web App (PWA)** — install it for the full native app experience with no browser chrome, keyboard shortcuts, and offline support.
@@ -326,4 +352,3 @@ MIT — see [LICENSE](LICENSE) for details.
<div align="center">
<sub>Built with ⚡ by <a href="https://github.com/outsourc-e">@outsourc-e</a> and the Hermes Workspace community</sub>
</div>

View File

@@ -1,11 +1,31 @@
services:
hermes-workspace:
build: .
ports:
- "${PORT:-3000}:3000"
hermes-agent:
build:
context: .
dockerfile: docker/agent/Dockerfile
env_file:
- .env
environment:
- HERMES_API_URL=${HERMES_API_URL:-http://host.docker.internal:8642}
- HERMES_PASSWORD=${HERMES_PASSWORD:-}
- HERMES_ALLOWED_HOSTS=${HERMES_ALLOWED_HOSTS:-}
restart: unless-stopped
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8642/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
ports:
- "8642:8642"
hermes-workspace:
build:
context: .
dockerfile: docker/workspace/Dockerfile
depends_on:
hermes-agent:
condition: service_healthy
env_file:
- .env
environment:
HERMES_API_URL: http://hermes-agent:8642
ports:
- "3000:3000"

15
docker/agent/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM python:3.11-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN git clone https://github.com/outsourc-e/hermes-agent.git /app
RUN pip install --no-cache-dir -e .
EXPOSE 8642
CMD ["python", "-m", "webapi"]

View File

@@ -0,0 +1,17 @@
FROM node:22-slim
RUN npm install -g pnpm
WORKDIR /app
COPY package.json pnpm-lock.yaml* ./
RUN if [ -f pnpm-lock.yaml ]; then pnpm install --frozen-lockfile; else pnpm install; fi
COPY . .
ENV HERMES_API_URL=http://hermes-agent:8642
EXPOSE 3000
CMD ["pnpm", "dev", "--host", "0.0.0.0", "--port", "3000"]