Infrastructure & DevOps

Hosting

The CMS platform is hosted on Scaleway (EU data residency required). S3-compatible object storage is provided by Scaleway Object Storage or MinIO.

Container Topology

ContainerRoleKey configuration
foNuxt SSG static artifactsServed by edge nginx, static behind CDN
boNuxt SPAEdge history fallback on /bo/*
api-phpPHP-FPM (Symfony + API Platform)Non-root user, stateless, horizontally scalable
api-nginxNginx fastcgi proxyNon-root user, client_max_body_size 12m
postgresPostgreSQLICU locale alignment with PHP (pinned to v74)
redisCacheJWKS cache, RateLimiter, preview one-time tokens
elasticsearchSearch engineFull-text search, per-website index isolation, multilingual analyzers
nginx-edgeReverse proxy (TLS termination)Brotli/gzip, HSTS preload, security headers, X-Request-Id

External Dependencies (OnePlatform)

ServiceRole
KeycloakOIDC identity provider (one BO client per tenant)
S3Object storage (presigned uploads, tenant-prefixed)
CDNStatic asset delivery with Surrogate-Key invalidation
ElasticsearchFull-text search (Arabic support planned)
MatomoSelf-hosted analytics (GDPR-compliant)
n8nWorkflow automation

Monitoring & Logging

Logging

  • Symfony: Monolog (structured JSON logging)
  • Log aggregation: ELK or EFK stack
  • Correlation: X-Request-Id header propagated across all services
  • Retention: 90 days

Metrics & Observability

  • Stack: OpenTelemetry + Prometheus + Grafana
  • Key metrics: request latency (p50/p95/p99), error rate, cache hit ratio, tenant resource usage
  • Alerting: Grafana alerts on SLO breach

SLO Targets

MetricTarget
API p95 latency< 300ms
API p99 latency< 600ms
Error rate< 1%
FO Lighthouse score≥ 90
TTFB≤ 600ms
Cache hit ratio≥ 85%

Security

Container Hardening

  • All containers run as non-root user
  • readOnlyRootFilesystem enabled
  • no-new-privileges security option
  • Vulnerability scanning: Trivy and Grype in CI

Secrets Management

  • Quarterly secret rotation
  • Rate-limiter pepper included in rotation cycle
  • No secrets in Docker images or environment files committed to git

Backup & Recovery

AspectConfiguration
DatabaseDaily full backup + WAL (Write-Ahead Log) continuous
Retention30 days
Restore testMonthly on shadow database — must pass
S3Versioning enabled, cross-region replication for production

Keycloak Configuration

Per-Tenant Setup

  • One public PKCE client per tenant (bo-<tenant>)
  • No Refresh Token in V0.1 (BFF planned for V0.2)
  • Required claims: roles, tenantId, email, name
  • api-cms audience mapper configured
  • azp allowlist maintained per environment
  • Logout: RP-Initiated Logout

Automation

  • New tenant provisioning target: < 10 minutes
  • Scripted via Keycloak Admin API

S3 / Object Storage

SettingValue
Upload methodPresigned PUT (max 10 MiB)
EncryptionSSE-S3 or SSE-KMS
AccessBlockPublicAccess = true
IAMScoped to tenant prefix (tenant_id/media/...)
CORSAllowed origins whitelist
Upload validationcontent-length-range enforced, HEAD post-upload with backoff

CDN Configuration

Cache Invalidation

  • Primary: Surrogate-Key headers (exposed via CORS)
  • Key format: t:<tenant>, type:<entity>, locale:<xx>, slug:<slugAscii>
  • Fallback: Pattern-based purge (documented runbook)

Headers

  • Vary: Origin, Accept-Language, Accept-Encoding
  • CORS headers exposed through CDN
  • Authorization stripped on /v1/public/* paths

DNS & TLS

  • FO domain pattern: fo.<tenant>.<domain>
  • HSTS preload enabled
  • TLS termination at nginx-edge

Prerequisites Matrix

Each prerequisite must be validated by its owner before V0.1 can proceed.
PrerequisiteOwnerDependency
Keycloak realms + clientsPlatform teamAPI + BO authentication
S3 buckets + IAM policiesPlatform teamMedia uploads
CDN with Surrogate-KeyPlatform teamCache invalidation
DNS + TLS certificatesPlatform teamFO multi-tenant domains
PostgreSQL with ICU v74DBA / PlatformSlug normalization, i18n
Redis instancePlatform teamJWKS cache, rate-limit, preview tokens
Elasticsearch clusterPlatform teamFull-text search for pages and articles
ELK/EFK stackPlatform teamLogging
Prometheus + GrafanaPlatform teamMetrics + alerting
Trivy/Grype scanningDevOpsContainer security
k6 load test environmentDevOpsSLO validation