# 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: