From f1730a7a880bd0fbcda28a0efdb4d944f74ca95e Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Thu, 3 Sep 2026 10:39:23 -0500 Subject: [PATCH] docs: standardize readme, gitignore and environment definitions --- .gitignore | 4 ++++ README.md | 39 ++++++++++++++++++++++++++++++++++++++- docker-compose.yml | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index e69de29..f8af571 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,4 @@ +.env +data/ +*.log +.DS_Store diff --git a/README.md b/README.md index 137e7b9..7d90e7b 100644 --- a/README.md +++ b/README.md @@ -1 +1,38 @@ -# homelab-gitea +# 🐙 Homelab Gitea + +Self-hosted Git service providing repository management, webhooks, and issue tracking. + +Part of the [homelab-core](https://github.com/kiskaadee/homelab-core) cluster ecosystem. + +--- + +## 🏗️ Architecture & Storage + +- **Container Image**: `gitea/gitea:latest` +- **Proxy**: Traefik (attached to `proxy-net`) +- **Persistent Data**: `./data` (gitignored, bind-mounted to `/data`) +- **SSH Port**: `222` (Host SSH passthrough) +- **Web Port**: `3000` (Traefik ingress) + +--- + +## ⚙️ Environment Variables + +| Variable | Description | Default / Example | +| :--- | :--- | :--- | +| `GITEA_DOMAIN` | Web UI FQDN | `gitea.arch-services.mywire.org` | +| `GITEA_SSH_DOMAIN` | SSH clone domain | `gitea.arch-services.mywire.org` | + +--- + +## 🚀 Deployment + +### Via Orchestrator (`appctl`) +```bash +appctl up homelab-gitea +``` + +### Manual Deployment +```bash +docker compose up -d +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..81cf1ac --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +services: + gitea: + image: gitea/gitea:${GITEA_VERSION:-latest} + container_name: ${CONTAINER_NAME:-gitea} + restart: always + environment: + - USER_UID=${USER_UID:-1000} + - USER_GID=${USER_GID:-1000} + # Gitea configuration via environment variables + - GITEA__database__DB_TYPE=${DB_TYPE:-sqlite3} + - GITEA__server__DOMAIN=${SERVICE_DOMAIN} + - GITEA__server__SSH_DOMAIN=${SSH_DOMAIN:-${SERVICE_DOMAIN}} + - GITEA__server__ROOT_URL=https://${SERVICE_DOMAIN} + volumes: + - ${DATA_PATH:-./data}:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + networks: + - proxy-net + labels: + - "traefik.enable=true" + # WebSecure Router + - "traefik.http.routers.${CONTAINER_NAME:-gitea}.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}.entrypoints=websecure" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}.tls=true" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}.middlewares=${AUTH_MIDDLEWARE}" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}.service=${CONTAINER_NAME:-gitea}-svc" + # HTTP to HTTPS Redirect Router + - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.entrypoints=web" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE}" + # Service definition + - "traefik.http.services.${CONTAINER_NAME:-gitea}-svc.loadbalancer.server.port=3000" + +networks: + proxy-net: + name: ${PROXY_NETWORK:-proxy-net} + external: true