4-package monorepo: - @tokenvault/core: Fastify 5.x proxy server, 7-stage pipeline, 3 provider adapters (Anthropic, OpenAI, Ollama), PostgreSQL ticket system, cost calculator with real provider pricing - @tokenvault/mcp: MCP server (stdio) with tv_ticket, tv_cost, tv_health tools for IDE integration - @tokenvault/client: TypeScript SDK with createTokenVaultClient() - @tokenvault/dashboard: Single-file HTML dashboard with MAGATAMA CI style (indigo #6366f1), bilingual DE+EN, 4 tabs OpenAI-compatible proxy at /v1/chat/completions — drop-in replacement. Every LLM request becomes a trackable ticket (TV-00001).
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
module.exports = {
|
|
apps: [
|
|
{
|
|
name: 'tokenvault',
|
|
script: 'packages/core/dist/server.js',
|
|
cwd: '/opt/tokenvault',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
TOKENVAULT_PORT: '3300',
|
|
TOKENVAULT_HOST: '0.0.0.0',
|
|
DB_HOST: '127.0.0.1',
|
|
DB_PORT: '5432',
|
|
DB_NAME: 'tokenvault',
|
|
DB_USER: 'tokenvault',
|
|
QDRANT_URL: 'http://localhost:6333',
|
|
OLLAMA_URL: 'https://ollama.fichtmueller.org',
|
|
},
|
|
instances: 1,
|
|
exec_mode: 'fork',
|
|
max_memory_restart: '512M',
|
|
error_file: '/opt/tokenvault/logs/error.log',
|
|
out_file: '/opt/tokenvault/logs/out.log',
|
|
merge_logs: true,
|
|
time: true,
|
|
watch: false,
|
|
autorestart: true,
|
|
max_restarts: 10,
|
|
restart_delay: 5000,
|
|
},
|
|
{
|
|
name: 'tokenvault-dashboard',
|
|
script: 'packages/dashboard/dist/server.js',
|
|
cwd: '/opt/tokenvault',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
PORT: '3301',
|
|
TOKENVAULT_CORE_URL: 'http://localhost:3300',
|
|
},
|
|
instances: 1,
|
|
exec_mode: 'fork',
|
|
max_memory_restart: '256M',
|
|
error_file: '/opt/tokenvault/logs/dashboard-error.log',
|
|
out_file: '/opt/tokenvault/logs/dashboard-out.log',
|
|
merge_logs: true,
|
|
time: true,
|
|
watch: false,
|
|
autorestart: true,
|
|
},
|
|
],
|
|
};
|