4f5fde34a3
- New visual identity: solid dark cards, purple accent, iOS-like feel - Session replay: newest messages first, message input with send button - Chat proxy route for sending messages to sessions - systemd user service with deploy script - All pages restyled: Pulse, Memory, History, Skills, Cron, Soul, Config
39 lines
1.2 KiB
Bash
39 lines
1.2 KiB
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
SYSTEMD_DIR="$HOME/.config/systemd/user"
|
|
PORT="${1:-3100}"
|
|
|
|
echo "Building..."
|
|
cd "$PROJECT_DIR"
|
|
export PATH="$HOME/.hermes/node/bin:$PATH"
|
|
HERMES_BACKEND_URL=http://127.0.0.1:8643 npx next build
|
|
|
|
echo "Copying static assets to standalone..."
|
|
cp -r .next/static .next/standalone/.next/static
|
|
cp -r public .next/standalone/public
|
|
|
|
echo "Installing service..."
|
|
mkdir -p "$SYSTEMD_DIR"
|
|
sed "s|ExecStart=.*|ExecStart=/home/hermes/.hermes/node/bin/node $PROJECT_DIR/.next/standalone/server.js|" \
|
|
"$PROJECT_DIR/deploy/hermes-os.service" > "$SYSTEMD_DIR/hermes-os.service"
|
|
|
|
# Add port
|
|
if ! grep -q "PORT=" "$SYSTEMD_DIR/hermes-os.service"; then
|
|
sed -i "/NODE_ENV/a Environment=PORT=$PORT" "$SYSTEMD_DIR/hermes-os.service"
|
|
sed -i "/NODE_ENV/a Environment=HOSTNAME=0.0.0.0" "$SYSTEMD_DIR/hermes-os.service"
|
|
fi
|
|
|
|
systemctl --user daemon-reload
|
|
systemctl --user restart hermes-os
|
|
systemctl --user enable hermes-os
|
|
|
|
sleep 3
|
|
if curl -s -o /dev/null -w "%{http_code}" "http://localhost:$PORT" | grep -q 200; then
|
|
echo "✅ Hermes OS running on port $PORT"
|
|
else
|
|
echo "⚠️ Service started but health check failed"
|
|
systemctl --user status hermes-os --no-pager
|
|
fi
|