Files
vpn-dns-gateway/deploy/docker-compose.yml
T
billandClaude Opus 5.5 ad35197ee4
vpn-dns-gateway/pipeline/head This commit looks good
vpn-dns-gateway/pipeline/pr-main This commit looks good
Add Jenkins CI service, pricing app, tests and Jenkinsfile (refs #14)
Deploy Jenkins LTS 2.580.1 beside Gitea on The-Ocean:
- deploy/jenkins: official image pinned by digest plus python3 and a
  hashed 60-plugin lockfile (Pipeline + Gitea bundle tested by
  ci/jenkins-capacity, plus matrix-auth for named roles)
- compose: jenkins service with persistent jenkins-home, no published
  ports, 512 MiB RAM / 768 MiB RAM+swap / 0.75 CPU, 256 MiB heap
- Gitea webhooks restricted to the private jenkins host; Caddy alias
  keeps Jenkins->Gitea checkout and status traffic on the droplet
- Caddy serves ci.yebilly.me only to Stevens 155.246.0.0/16 and team
  IPs from the untracked .env

Add the instructor's pricing example, unit tests and Declarative
Jenkinsfile (checkout, syntax check, unit tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:55:59 -04:00

69 lines
2.4 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]
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: