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
This commit is contained in:
@@ -6,23 +6,20 @@ After=network.target
|
||||
Type=simple
|
||||
User=llamalink
|
||||
WorkingDirectory=/opt/llamalink
|
||||
ExecStart=/usr/local/bin/llamalink \
|
||||
--host 0.0.0.0 \
|
||||
--port 8000
|
||||
EnvironmentFile=/etc/llamalink/env
|
||||
ExecStart=/usr/local/bin/llamalink
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=llamalink
|
||||
|
||||
# Security
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/opt/llamalink/data
|
||||
ReadOnlyPaths=/opt/llamalink/models
|
||||
Environment=LLAMALINK_ENV=production
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user