Files
vpn-dns-gateway/deploy/docker-compose.yml
T
billandClaude Opus 5.5 d3a5e6bc73
vpn-dns-gateway/pipeline/head This commit looks good
Add Prometheus/Grafana monitoring stack (refs #19)
Assignment 7 (instructor manual v1.42, Chapter 5): Prometheus, Grafana OSS,
Node Exporter and Blackbox Exporter beside Gitea/Jenkins on The-Ocean, pinned
by tag and digest, memory-capped for the 1 GiB droplet, no host ports.

- monitoring/: compose, scrape and probe config, Grafana provisioning
  (data source, Group 1 SRE dashboard, two alert rules, Discord contact
  point via env var), README with deploy/backup/rollback and runbooks,
  EVIDENCE.md with the deploy, capacity and exposure test records.
- deploy/: private probe network (172.30.90.0/28) with Caddy aliases;
  ci allowlist admits only the Blackbox address 172.30.90.10; new
  metrics.yebilly.me route behind the same allowlist.
- manual images: DNS record, Discord webhook, contact-point test, dashboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 11:11:02 -04:00

79 lines
2.9 KiB
YAML

# Gitea behind Caddy (automatic Let's Encrypt HTTPS) on the The-Ocean droplet.
# Only Caddy publishes ports; Gitea is reachable solely on the private "web" network.
services:
gitea:
image: gitea/gitea:1.27.3
restart: unless-stopped
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=sqlite3 # file: /data/gitea/gitea.db
- GITEA__server__DOMAIN=git.yebilly.me
- GITEA__server__ROOT_URL=https://git.yebilly.me/
- GITEA__server__HTTP_PORT=3000
- GITEA__server__DISABLE_SSH=true # Git over HTTPS only
- GITEA__webhook__ALLOWED_HOST_LIST=jenkins # only private webhook target allowed
volumes:
- gitea-data:/data
networks: [web]
# ponytail: no ports: on purpose -- Caddy reaches gitea:3000 privately.
caddy:
image: caddy:2.11.4-alpine
restart: unless-stopped
ports:
- "80:80" # HTTP->HTTPS redirect + ACME HTTP-01 validation
- "443:443" # HTTPS
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data # certificates + ACME account
- caddy-config:/config
environment:
- CI_TEAM_IPS=${CI_TEAM_IPS:-} # team source IPs for ci.yebilly.me, kept in untracked .env
networks:
web:
# Jenkins resolves git.yebilly.me to Caddy here, so checkout and status
# calls stay on the droplet instead of hairpinning through the public IP.
aliases: [git.yebilly.me]
probe:
# Blackbox Exporter (monitoring/compose.yaml) probes both sites through Caddy here.
aliases: [git.yebilly.me, ci.yebilly.me]
depends_on: [gitea]
# Jenkins LTS controller (Assignment 6). Builds run on its single executor.
# Bounded so Gitea keeps memory on the 512 MB droplet.
jenkins:
build: ./jenkins
image: ssw590-jenkins:2.580.1
restart: unless-stopped
environment:
# The capacity test's 128 MiB heap ran builds, but the web UI hit "OutOfMemoryError:
# Java heap space" once the update-center catalog loaded (2026-10-22), so the
# persistent service gets twice the test bounds on the 1 GiB droplet.
- JAVA_OPTS=-Xms64m -Xmx256m -XX:+UseSerialGC -Djava.awt.headless=true
volumes:
- jenkins-home:/var/jenkins_home
networks: [web]
mem_limit: 512m
memswap_limit: 768m
cpus: 0.75
pids_limit: 256
# ponytail: no ports: on purpose -- Caddy and the Gitea webhook reach jenkins:8080 privately;
# agent port 50000 is never published.
volumes:
gitea-data:
caddy-data:
caddy-config:
jenkins-home:
networks:
web:
# Fixed subnet so Blackbox Exporter can have a fixed address (172.30.90.10), the only
# private address the ci.yebilly.me allowlist admits. The web subnet stays denied:
# Docker's proxy presents IPv6 and hairpin visitors as its gateway, 172.18.0.1.
probe:
ipam:
config:
- subnet: 172.30.90.0/28