feat: add comprehensive logging infrastructure

- Add Loki/Prometheus/Grafana stack in logging-stack/
- Add log-ingest service for receiving events from AI stacks
- Add Grafana dashboard with stack_name filtering
- Update Dokploy client with setApplicationEnv method
- Configure STACK_NAME env var for deployed stacks
- Add alerting rules for stack health monitoring
This commit is contained in:
Oussama Douhou
2026-01-10 13:22:46 +01:00
parent e617114310
commit 2f4722acd0
16 changed files with 1631 additions and 0 deletions

View File

@@ -280,6 +280,18 @@ export class ProductionDeployer {
registryId: config.registryId,
});
state.progress = 52;
state.message = 'Setting environment variables for logging';
const envVars = [
`STACK_NAME=${config.stackName}`,
`USAGE_LOGGING_ENABLED=true`,
`LOG_INGEST_URL=${process.env.LOG_INGEST_URL || 'http://10.100.0.20:3102/ingest'}`,
`METRICS_PORT=9090`,
].join('\n');
await this.client.setApplicationEnv(state.resources.applicationId, envVars);
state.progress = 55;
state.message = 'Creating persistent storage';