From 930fefb32d569826fd374567db199ac4b10f080f Mon Sep 17 00:00:00 2001 From: Cedric Pollefeys Date: Tue, 29 Sep 2026 21:38:44 -0400 Subject: [PATCH] Add Gitea and Caddy deployment configuration (#1) --- deploy/Caddyfile | 5 +++++ deploy/compose.yaml | 49 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 deploy/Caddyfile create mode 100644 deploy/compose.yaml diff --git a/deploy/Caddyfile b/deploy/Caddyfile new file mode 100644 index 0000000..e391fc2 --- /dev/null +++ b/deploy/Caddyfile @@ -0,0 +1,5 @@ +# Caddy obtains and renews the Let's Encrypt certificate for this hostname +# and redirects HTTP to HTTPS automatically. TLS terminates here. +git.pollefeys.dev { + reverse_proxy gitea:3000 +} diff --git a/deploy/compose.yaml b/deploy/compose.yaml new file mode 100644 index 0000000..48bd1e3 --- /dev/null +++ b/deploy/compose.yaml @@ -0,0 +1,49 @@ +# Seat-Back Trivia startup work hub: Gitea behind Caddy on the ssw-590 droplet. +# Only Caddy publishes host ports. Gitea is reachable only on the private +# gitea-net network, and its SQLite database lives in the gitea-data volume. +name: gitea + +services: + caddy: + image: caddy:2.11.4 + restart: unless-stopped + ports: + - "80:80" + - "443:443" + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile:ro + - caddy-data:/data + - caddy-config:/config + networks: + - gitea-net + depends_on: + - gitea + + gitea: + image: docker.gitea.com/gitea:1.27.3 + restart: unless-stopped + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__server__DOMAIN=git.pollefeys.dev + - GITEA__server__ROOT_URL=https://git.pollefeys.dev/ + - GITEA__server__HTTP_PORT=3000 + - GITEA__server__DISABLE_SSH=true + - GITEA__database__DB_TYPE=sqlite3 + - GITEA__database__PATH=/data/gitea/gitea.db + - GITEA__security__INSTALL_LOCK=true + - GITEA__service__DISABLE_REGISTRATION=true + volumes: + - gitea-data:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + networks: + - gitea-net + +networks: + gitea-net: + +volumes: + gitea-data: + caddy-data: + caddy-config: