From c3193718a2efce993e62d7ad0c32fb523a3a8b34 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Fri, 4 Sep 2026 12:24:11 -0500 Subject: [PATCH] feat(houston): initialize Houston autonomous agent runtime micro-service - Add decentralized app.yaml manifest with aliases [agent, agents] and Homepage card registration - Configure docker-compose.yml attached to proxy-net behind Traefik v3 wildcard TLS - Use official multi-arch GHCR image (gethouston/houston-engine-pod) with persistent named volume to ensure workspace permission safety - Add standalone Dockerfile reference for offline/custom bundle builds - Release under The Unlicense (public domain) --- .gitignore | 4 +++ Dockerfile | 80 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 30 ++++++++++++++++- app.yaml | 18 +++++++++++ docker-compose.yml | 35 ++++++++++++++++++++ 5 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 app.yaml create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index e69de29..f8af571 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,4 @@ +.env +data/ +*.log +.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d473659 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,80 @@ +# syntax=docker/dockerfile:1 +# Houston Autonomous Agent Runtime & Host Dockerfile +# Clones upstream gethouston/houston directly to ensure reproducible builds & clean updates. + +FROM node:22-bookworm-slim AS builder + +ENV PNPM_HOME=/pnpm \ + PATH=/pnpm:$PATH + +RUN corepack enable && \ + apt-get update && \ + apt-get install -y --no-install-recommends git ca-certificates python3 build-essential && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +# Clone upstream release +ARG HOUSTON_REPO=https://github.com/gethouston/houston.git +ARG HOUSTON_TAG=main +RUN git clone --depth 1 --branch ${HOUSTON_TAG} ${HOUSTON_REPO} . + +# Build Workspace Bundles +RUN pnpm install --frozen-lockfile \ + --filter houston-ai \ + --filter @houston/runtime... \ + --filter @houston/host... + +RUN node selfhost/bundle.mjs + +# Build Frontend Web UI if available +RUN if [ -d "packages/web" ]; then \ + VITE_NEW_ENGINE=1 pnpm --filter houston-web build && \ + mkdir -p /build/dist/web && cp -R packages/web/dist/* /build/dist/web/; \ + fi + +# ----------------------------------------------------------------------------- +# Runtime Production Image +# ----------------------------------------------------------------------------- +FROM node:22-bookworm-slim AS runner + +ENV PNPM_HOME=/pnpm \ + PATH=/pnpm:$PATH + +RUN corepack enable && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + git python3 curl wget ca-certificates procps && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +# Copy built bundle and node dependencies +COPY --from=builder /build/package.json /build/pnpm-lock.yaml /build/pnpm-workspace.yaml ./ +COPY --from=builder /build/patches/ ./patches/ +COPY --from=builder /build/ui/agent-schemas/ ./ui/agent-schemas/ +COPY --from=builder /build/packages/ ./packages/ +COPY --from=builder /build/dist /app/dist + +RUN pnpm install --frozen-lockfile --prod \ + --filter @houston/runtime... \ + --filter @houston/host... + +RUN ln -s /app/node_modules/.pnpm/node_modules /app/dist/host/node_modules 2>/dev/null || true && \ + ln -s /app/node_modules/.pnpm/node_modules /app/dist/runtime/node_modules 2>/dev/null || true + +RUN mkdir -p /data/workspaces /data/db && chown -R node:node /app /data + +ENV NODE_ENV=production \ + HOUSTON_HOME=/data \ + HOUSTON_HOST_BIND=0.0.0.0 \ + HOUSTON_HOST_PORT=4318 \ + HOUSTON_RUNTIME_COMMAND="node --enable-source-maps /app/dist/runtime/main.mjs" + +USER node +EXPOSE 4318 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ + CMD node -e "fetch('http://127.0.0.1:'+(process.env.HOUSTON_HOST_PORT||4318)+'/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" + +CMD ["node", "--enable-source-maps", "dist/host/main.mjs"] diff --git a/README.md b/README.md index 16401d9..e8e2fa9 100644 --- a/README.md +++ b/README.md @@ -1 +1,29 @@ -# homelab-houston +# 🚀 Houston AI Self-Hosted Agent Host + +Autonomous agent host and runtime for `roadtotech.me`, providing AI agents with tool-use, workspace execution, and streaming endpoints. + +--- + +## 🏗️ Architecture & Configuration + +- **Domain**: `https://houston.roadtotech.me` +- **Internal Port**: `4318` +- **Orchestrator**: Managed via `appctl` +- **Network**: `proxy-net` behind Traefik v3 wildcard SSL + +--- + +## 🚀 Deployment + +```bash +# Start Houston stack +appctl up houston + +# View status +appctl info houston +``` + +--- + +## 📄 License +This deployment configuration is released into the public domain under the [Unlicense](LICENSE). diff --git a/app.yaml b/app.yaml new file mode 100644 index 0000000..62950fa --- /dev/null +++ b/app.yaml @@ -0,0 +1,18 @@ +name: "houston" +aliases: + - "agent" + - "agents" +domain: "houston.roadtotech.me" +description: "Houston Autonomous AI Agent Host & Runtime" +visible: true +auth: false +networks: + - proxy-net +env: + HOUSTON_HOST_TOKEN: "supersecrettokenforhoustonhostinproduction" +homepage: + title: "Houston" + group: "Development & AI" + icon: "houston.png" + container: "houston" + weight: 15 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e0c8a0b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +services: + houston: + image: ghcr.io/gethouston/houston-engine-pod:latest + container_name: ${CONTAINER_NAME:-houston} + restart: unless-stopped + environment: + - HOUSTON_HOST_TOKEN=${HOUSTON_HOST_TOKEN:-supersecrettokenforhoustonhostinproduction} + - COMPOSIO_API_KEY=${COMPOSIO_API_KEY:-} + - SENTRY_DSN=${SENTRY_DSN:-} + volumes: + - houston-data:/data + networks: + - proxy-net + labels: + - "traefik.enable=true" + # HTTPS Router + - "traefik.http.routers.${CONTAINER_NAME:-houston}.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-houston}.entrypoints=websecure" + - "traefik.http.routers.${CONTAINER_NAME:-houston}.tls=true" + - "traefik.http.routers.${CONTAINER_NAME:-houston}.service=${CONTAINER_NAME:-houston}-svc" + # HTTP to HTTPS Redirect + - "traefik.http.routers.${CONTAINER_NAME:-houston}-red.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-houston}-red.entrypoints=web" + - "traefik.http.routers.${CONTAINER_NAME:-houston}-red.middlewares=https-redirect@docker" + # Target Port (Houston engine listens on 4318) + - "traefik.http.services.${CONTAINER_NAME:-houston}-svc.loadbalancer.server.port=4318" + +volumes: + houston-data: + +networks: + proxy-net: + name: ${PROXY_NETWORK:-proxy-net} + external: true +