- Docker: Multi-stage Dockerfile with security hardening, docker-compose for production and development environments - Environment: Comprehensive .env.example with all config options, lib/config/env.ts for typed environment validation - Logging: Structured JSON logging with request/response middleware - Monitoring: Prometheus metrics endpoint, Grafana dashboard, health checks (liveness/readiness probes) - Security: Security headers, rate limiting, CORS middleware - CI/CD: GitHub Actions workflows for CI, production deploy, and preview deployments - Error tracking: Sentry integration foundation Files created: - Docker: Dockerfile, docker-compose.yml, docker-compose.dev.yml, .dockerignore - Config: lib/config/env.ts, lib/config/index.ts - Logging: lib/logging/logger.ts, lib/logging/middleware.ts - Monitoring: lib/monitoring/sentry.ts, lib/monitoring/metrics.ts, lib/monitoring/health.ts - Security: lib/security/headers.ts, lib/security/rateLimit.ts, lib/security/cors.ts - API: pages/api/health/*, pages/api/metrics.ts - Infra: infra/prometheus/prometheus.yml, infra/grafana/*
30 lines
629 B
YAML
30 lines
629 B
YAML
# LocalGreenChain Grafana Datasources
|
|
# Agent 4: Production Deployment
|
|
|
|
apiVersion: 1
|
|
|
|
datasources:
|
|
# Prometheus
|
|
- name: Prometheus
|
|
type: prometheus
|
|
access: proxy
|
|
url: http://prometheus:9090
|
|
isDefault: true
|
|
editable: false
|
|
jsonData:
|
|
timeInterval: "15s"
|
|
httpMethod: POST
|
|
|
|
# PostgreSQL (optional)
|
|
# - name: PostgreSQL
|
|
# type: postgres
|
|
# url: postgres:5432
|
|
# database: localgreenchain
|
|
# user: lgc
|
|
# secureJsonData:
|
|
# password: ${DB_PASSWORD}
|
|
# jsonData:
|
|
# sslmode: disable
|
|
# maxOpenConns: 5
|
|
# maxIdleConns: 2
|
|
# connMaxLifetime: 14400
|