Commit Graph

3 Commits

Author SHA1 Message Date
darroyo 596f194c3a fix: set WorkingDirectory to /opt/llamalink/data in systemd unit
CI / test (push) Failing after 12m40s
The llamalink service fails to start because ProtectSystem=strict only
allows writes to ReadWritePaths=/opt/llamalink/data, but the default
DATABASE_URL=sqlite:///./llamalink.db resolves relative to WorkingDirectory.

With WorkingDirectory=/opt/llamalink, the db lands at /opt/llamalink/llamalink.db
which is not in ReadWritePaths, causing sqlite open to fail.

Setting WorkingDirectory=/opt/llamalink/data aligns with the package layout
(postinst creates /opt/llamalink/data) and makes the default ./llamalink.db
resolve to the correct writable location.
2026-07-31 15:32:31 -04:00
darroyo 0d6c8c7989 Add embedded Vue SPA admin panel with go:embed
CI / test (push) Failing after 13m11s
This is the complete fix for the missing /admin/ route and frontend serving:

Backend:
- internal/web/web.go: new package with go:embed for web/dist/
- internal/api/router.go: add routes for /admin/, /admin/*, /assets/*
- internal/db/db.go: fix SQLite DSN parsing (sqlite:///path -> path)

Build system:
- Makefile: new 'embed-prep' target copies web/dist to internal/web/dist
- make build now runs embed-prep -> frontend/build automatically

Deployment:
- deploy/llamalink.service: remove invalid --host/--port flags,
  add EnvironmentFile=/etc/llamalink/env

Verified:
- /health returns 200
- /admin/ serves Vue SPA HTML
- /assets/* serves CSS and JS files from embedded FS
- sqlite:///./llamalink.db works correctly
2026-07-31 14:47:15 -04:00
darroyo 4c9ed3c24b Initial commit: LlamaLink Go rewrite
Complete rewrite from Python/FastAPI to Go/Gin:
- Go backend: auth (API keys + bcrypt), llama.cpp subprocess manager,
  hot-swap multi-model, rate limiting, quota system, webhooks
- Vue 3 SPA admin panel (src/) with Tailwind CSS
- Deployment: Docker multi-stage, docker-compose, nginx, systemd
- GORM/SQLite models: ApiKey, Model, UsageLog, Quota, Webhook
- REST API: /api/v1/admin/* (keys, models, chat, usage, health)
- Embedded frontend via go:embed (build output at web/dist/)

Removed legacy Python artifacts (app/, tests/, pyproject.toml, etc.)
2026-07-30 10:58:55 -04:00