Compare commits
15 Commits
fix/himala
...
37bf43c3ea
| Author | SHA1 | Date | |
|---|---|---|---|
| 37bf43c3ea | |||
| 563ccc5632 | |||
| 8d1ae7e632 | |||
| 29ae32a1c5 | |||
| 8dff094768 | |||
| ec08f5eb5d | |||
| 611e96b306 | |||
| f184ed957c | |||
| 2bf31c7ccc | |||
| f44f93e35a | |||
| 4cdd157e3f | |||
| 3ba0345887 | |||
| 5e242eb946 | |||
| e607982b21 | |||
| 4627199217 |
@@ -31,6 +31,9 @@ services:
|
||||
ssh:
|
||||
- default
|
||||
container_name: hermes
|
||||
entrypoint: ["/bin/bash", "-c",
|
||||
"bash /opt/data/hermes-tools/install.sh && exec /usr/bin/tini -g -- /opt/hermes/docker/entrypoint.sh \"$@\"",
|
||||
"hermes-entrypoint"]
|
||||
restart: always
|
||||
# Gateway run enables the internal API server on port 8642
|
||||
command: gateway run
|
||||
@@ -93,6 +96,62 @@ services:
|
||||
- "303"
|
||||
- "26"
|
||||
|
||||
paperclip-db:
|
||||
image: postgres:17-alpine
|
||||
container_name: paperclip-db
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: paperclip
|
||||
POSTGRES_PASSWORD: ${PAPERCLIP_DB_PASSWORD:?PAPERCLIP_DB_PASSWORD must be set}
|
||||
POSTGRES_DB: paperclip
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U paperclip -d paperclip"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
volumes:
|
||||
- /mnt/HoardingCow_docker_data/Paperclip/pgdata:/var/lib/postgresql/data
|
||||
networks:
|
||||
- ai_backend
|
||||
|
||||
paperclip:
|
||||
build:
|
||||
context: ./paperclip
|
||||
container_name: paperclip
|
||||
restart: always
|
||||
ports:
|
||||
- "127.0.0.1:3100:3100"
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- PORT=3100
|
||||
- SERVE_UI=true
|
||||
- DATABASE_URL=postgres://paperclip:${PAPERCLIP_DB_PASSWORD}@paperclip-db:5432/paperclip
|
||||
- BETTER_AUTH_SECRET=${PAPERCLIP_AUTH_SECRET:?PAPERCLIP_AUTH_SECRET must be set}
|
||||
- PAPERCLIP_PUBLIC_URL=https://paperclip.lazyworkhorse.net
|
||||
- PAPERCLIP_DEPLOYMENT_MODE=authenticated
|
||||
- PAPERCLIP_DEPLOYMENT_EXPOSURE=private
|
||||
volumes:
|
||||
- /mnt/HoardingCow_docker_data/Paperclip/data:/paperclip
|
||||
depends_on:
|
||||
paperclip-db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- ai_net
|
||||
- ai_backend
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
|
||||
- "traefik.http.routers.paperclip-http.rule=Host(`paperclip.lazyworkhorse.net`)"
|
||||
- "traefik.http.routers.paperclip-http.entrypoints=web"
|
||||
- "traefik.http.routers.paperclip-http.middlewares=redirect-to-https"
|
||||
|
||||
- "traefik.http.routers.paperclip-https.rule=Host(`paperclip.lazyworkhorse.net`)"
|
||||
- "traefik.http.routers.paperclip-https.entrypoints=websecure"
|
||||
- "traefik.http.routers.paperclip-https.tls=true"
|
||||
- "traefik.http.routers.paperclip-https.tls.certresolver=njalla"
|
||||
|
||||
- "traefik.http.services.paperclip.loadbalancer.server.port=3100"
|
||||
|
||||
networks:
|
||||
ai_net:
|
||||
external: true
|
||||
|
||||
@@ -86,7 +86,8 @@ ENV PATH="/opt/data/.local/bin:${PATH}"
|
||||
# Point browser tool to Playwright's Chromium (already in base image)
|
||||
ENV CHROME_EXECUTABLE=/opt/hermes/.playwright/chromium/chrome-linux/chrome
|
||||
|
||||
VOLUME [ "/opt/data" ]
|
||||
# Ensure tools directory and toolsets.py are writable by the hermes runtime user
|
||||
# so custom tools can be injected from the persistent volume at startup.
|
||||
RUN chown -R hermes:hermes /opt/hermes/tools /opt/hermes/toolsets.py
|
||||
|
||||
COPY --chmod=0755 fix-permissions.sh /opt/hermes/fix-permissions.sh
|
||||
ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "/opt/hermes/fix-permissions.sh" ]
|
||||
VOLUME [ "/opt/data" ]
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Startup permission fix + TTS patch.
|
||||
# Runs as root before the entrypoint drops to the hermes user.
|
||||
set -e
|
||||
|
||||
HERMES_HOME="${HERMES_HOME:-/opt/data}"
|
||||
|
||||
# Fix ownership on critical writable directories
|
||||
chown -R hermes:hermes \
|
||||
"$HERMES_HOME/sessions" \
|
||||
"$HERMES_HOME/checkpoints" \
|
||||
"$HERMES_HOME/skills" \
|
||||
"$HERMES_HOME/memories" \
|
||||
"$HERMES_HOME/workspace" \
|
||||
"$HERMES_HOME/pastes" \
|
||||
"$HERMES_HOME/logs" \
|
||||
"$HERMES_HOME/cron" \
|
||||
"$HERMES_HOME/plans" \
|
||||
"$HERMES_HOME/hooks" \
|
||||
"$HERMES_HOME/cache" \
|
||||
2>/dev/null || true
|
||||
|
||||
# Fix data volume root ownership
|
||||
if [ "$(stat -c %u "$HERMES_HOME" 2>/dev/null)" != "$(id -u hermes)" ]; then
|
||||
chown hermes:hermes "$HERMES_HOME" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# ---------- Patch tts_tool.py: replace Edge TTS with Piper ----------
|
||||
# Fallback runtime patch in case the volume's site-packages differ from the image.
|
||||
# Idempotent: if already patched, the script does nothing.
|
||||
PATCH_SCRIPT="/opt/hermes/patch_tts_tool.py"
|
||||
if [ -f "$PATCH_SCRIPT" ]; then
|
||||
echo "Applying TTS patch (Piper only, no Edge fallback)..."
|
||||
/opt/hermes/.venv/bin/python3 "$PATCH_SCRIPT" 2>&1 || true
|
||||
fi
|
||||
|
||||
# Chain to the official Hermes entrypoint
|
||||
exec /opt/hermes/docker/entrypoint.sh "$@"
|
||||
47
ai/paperclip/Dockerfile
Normal file
47
ai/paperclip/Dockerfile
Normal file
@@ -0,0 +1,47 @@
|
||||
# syntax=docker/dockerfile:1.20
|
||||
FROM ghcr.io/paperclipai/paperclip:v2026.517.0
|
||||
|
||||
# ── Install Hermes adapter npm package into seed directory ──────────
|
||||
# This seed data gets copied to the persistent volume on first boot
|
||||
# so the adapter is available without network access.
|
||||
USER root
|
||||
|
||||
RUN npm install --no-save --prefix /opt/paperclip-seed/adapter-plugins \
|
||||
hermes-paperclip-adapter@0.3.0
|
||||
|
||||
# Create adapter-plugins.json metadata (Paperclip reads this on startup
|
||||
# to discover which external adapters to load)
|
||||
RUN mkdir -p /opt/paperclip-seed && python3 -c "
|
||||
import json
|
||||
record = {
|
||||
'packageName': 'hermes-paperclip-adapter',
|
||||
'version': '0.3.0',
|
||||
'type': 'hermes',
|
||||
'installedAt': '2026-05-18T00:00:00.000Z',
|
||||
}
|
||||
with open('/opt/paperclip-seed/adapter-plugins.json', 'w') as f:
|
||||
json.dump([record], f, indent=2)
|
||||
"
|
||||
|
||||
# Ensure the adapter-plugins dir has a package.json (Paperclip expects one)
|
||||
RUN python3 -c "
|
||||
import json
|
||||
pkg = {
|
||||
'name': 'paperclip-adapter-plugins',
|
||||
'version': '0.0.0',
|
||||
'private': True,
|
||||
'description': 'Managed directory for Paperclip external adapter plugins.',
|
||||
}
|
||||
with open('/opt/paperclip-seed/adapter-plugins/package.json', 'w') as f:
|
||||
json.dump(pkg, f, indent=2)
|
||||
"
|
||||
|
||||
# ── Custom entrypoint ──────────────────────────────────────────────
|
||||
# Seeds the Hermes adapter on fresh volumes, then runs original logic.
|
||||
COPY docker-entrypoint.sh /usr/local/bin/paperclip-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/paperclip-entrypoint.sh
|
||||
|
||||
USER node
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/paperclip-entrypoint.sh"]
|
||||
CMD ["node", "--import", "./server/node_modules/tsx/dist/loader.mjs", "server/dist/index.js"]
|
||||
35
ai/paperclip/docker-entrypoint.sh
Normal file
35
ai/paperclip/docker-entrypoint.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# ── Seed Hermes adapter if volume is fresh ──────────────────────────
|
||||
PAPERCLIP_HOME="${PAPERCLIP_HOME:-/paperclip}"
|
||||
if [ ! -f "${PAPERCLIP_HOME}/adapter-plugins.json" ]; then
|
||||
echo "[paperclip] Seeding Hermes adapter plugin..."
|
||||
cp -r /opt/paperclip-seed/* "${PAPERCLIP_HOME}/"
|
||||
chown -R "${USER_UID:-1000}:${USER_GID:-1000}" \
|
||||
"${PAPERCLIP_HOME}/adapter-plugins" \
|
||||
"${PAPERCLIP_HOME}/adapter-plugins.json"
|
||||
echo "[paperclip] Hermes adapter seeded. Ready to create Hermes agents."
|
||||
fi
|
||||
|
||||
# ── Original entrypoint logic (UID/GID adjustment) ──────────────────
|
||||
PUID="${USER_UID:-1000}"
|
||||
PGID="${USER_GID:-1000}"
|
||||
changed=0
|
||||
|
||||
if [ "$(id -u node)" -ne "$PUID" ]; then
|
||||
usermod -o -u "$PUID" node
|
||||
changed=1
|
||||
fi
|
||||
|
||||
if [ "$(id -g node)" -ne "$PGID" ]; then
|
||||
groupmod -o -g "$PGID" node
|
||||
usermod -g "$PGID" node
|
||||
changed=1
|
||||
fi
|
||||
|
||||
if [ "$changed" = "1" ]; then
|
||||
chown -R node:node "${PAPERCLIP_HOME}"
|
||||
fi
|
||||
|
||||
exec gosu node "$@"
|
||||
@@ -8,13 +8,10 @@ services:
|
||||
- USER_GID=1000
|
||||
- GITEA__server__ROOT_URL=https://code.lazyworkhorse.net
|
||||
- GITEA__actions__ENABLED=true
|
||||
- GITEA__actions__DEFAULT_ACTIONS_URL=off
|
||||
- SSH_PORT=2222
|
||||
- SSH_LISTEN_PORT=2222
|
||||
# Enable Gitea Actions (act_runner required on host)
|
||||
- GITEA__actions__ENABLED=true
|
||||
# Don't fetch actions from GitHub (offline mode + local only)
|
||||
- GITEA__actions__DEFAULT_ACTIONS_URL=off
|
||||
volumes:
|
||||
- /mnt/HoardingCow_docker_data/Gitea:/data
|
||||
networks:
|
||||
|
||||
9
vpn/Dockerfile
Normal file
9
vpn/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
# Custom wg-easy with iptables-nft (nftables-backed iptables)
|
||||
# Fixes crash-loop when host kernel lacks legacy iptable_nat module.
|
||||
FROM ghcr.io/wg-easy/wg-easy:latest
|
||||
|
||||
# The upstream image registers only iptables-legacy with update-alternatives.
|
||||
# iptables-nft binary exists but isn't registered as an alternative key.
|
||||
# Override the alternatives-managed symlinks directly.
|
||||
RUN ln -sf /usr/sbin/iptables-nft /usr/sbin/iptables && \
|
||||
ln -sf /usr/sbin/ip6tables-nft /usr/sbin/ip6tables
|
||||
@@ -2,7 +2,10 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
wireguard:
|
||||
image: weejewel/wg-easy:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: wg-easy-iptables-nft:latest
|
||||
container_name: wireguard
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
|
||||
Reference in New Issue
Block a user