SPB Git forge
38commits 1branches 0releases
338.7 MBsize
maindefault branch
3 h agolast push
HTML 53.9% TypeScript 44.5% JavaScript 0.6% SQL 0.5%
1.9 KB · 77 lines
Raw Blame History
1# DataCenterIndex edge (data node). Plain HTTP on :8300, published ONLY on the WireGuard address2# 10.67.0.60 (see compose.data.yml). TLS terminates upstream on the BHS64 gateway3# (Caddy: https://www.datacenterindex.io → 10.67.0.60:8300), which is the trusted proxy.4{5	admin off6	auto_https off7	servers {8		trusted_proxies static 10.67.0.0/24 10.68.0.0/30 172.16.0.0/129		metrics10	}11	log {12		output stdout13		format json14		level INFO15	}16}1718:8300 {19	encode zstd gzip2021	header {22		-Server23		X-Content-Type-Options nosniff24		X-Frame-Options DENY25		Referrer-Policy strict-origin-when-cross-origin26		Permissions-Policy "camera=(), microphone=(), geolocation=(), interest-cohort=()"27		Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"28		defer29	}3031	# Fastify API — /api/v1/* public, /api/admin/* token, /api/health, /api/metrics32	@api path /api/*33	handle @api {34		# metrics are for Prometheus on the docker network only35		@metrics path /api/metrics36		respond @metrics 40437		reverse_proxy api:8311 {38			health_uri /api/ready39			health_interval 15s40			fail_duration 10s41			lb_try_duration 5s42		}43	}4445	# Next hashed assets are immutable46	handle /_next/static/* {47		header Cache-Control "public, max-age=31536000, immutable"48		reverse_proxy web:831049	}5051	handle /_next/image* {52		header Cache-Control "public, max-age=86400, stale-while-revalidate=604800"53		reverse_proxy web:831054	}5556	# Everything else → Next (SSR, RSC, static files in public/)57	handle {58		reverse_proxy web:8310 {59			health_uri /60			health_interval 30s61			health_status 2xx62			fail_duration 10s63			lb_try_duration 5s64		}65	}6667	handle_errors {68		@upstream expression {http.error.status_code} >= 50269		respond @upstream "DataCenterIndex is briefly unavailable ({http.error.status_code}). Retry in a moment." {http.error.status_code}70	}71}7273# Prometheus scrape target (docker network only, never published)74:9180 {75	metrics /metrics76}77