Files
canopy-workloads/gitea/docker-compose.yml
kiskaadee 45a9450526 fix(gitea,gitea_runner): use relative state mounts and nix-independent runner base
- Replace ~/var/lib/homelab/<app> with ../../var/lib/homelab/<app> in gitea and gitea_runner compose files so docker compose resolves state without HOME
- Remove inert HOMELAB_STATE_ROOT from gitea_runner/.env-example and update gitea_runner/README.md
- Rebase gitea_runner/Dockerfile on gitea/act_runner:latest with Alpine nodejs/git/bash/coreutils, regular-file /etc/nix/nix.conf, pinned nixos/nix:2.24.12 store, and entrypoint-nix.sh auto-seed wrapper
2026-11-18 23:03:22 -05:00

43 lines
1.9 KiB
YAML

services:
gitea:
image: gitea/gitea:${GITEA_VERSION:-latest}
container_name: ${CONTAINER_NAME:-gitea}
restart: unless-stopped
environment:
- USER_UID=${USER_UID:-1000}
- USER_GID=${USER_GID:-1000}
- TZ=${TZ:-UTC}
# 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__SSH_PORT=${SSH_PORT:-2223}
- GITEA__server__SSH_LISTEN_PORT=22
- GITEA__server__ROOT_URL=https://${SERVICE_DOMAIN}
- GITEA__webhook__ALLOWED_HOST_LIST=${GITEA_WEBHOOK_ALLOWED_HOST_LIST:-private,loopback,external}
ports:
- "${SSH_PORT:-2223}:22"
volumes:
- ../../var/lib/homelab/gitea:/data
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=${HTTPS_ENTRYPOINT:-websecure}"
- "traefik.http.routers.${CONTAINER_NAME:-gitea}.tls=true"
- "traefik.http.routers.${CONTAINER_NAME:-gitea}.tls.certresolver=${CERT_RESOLVER:-myresolver}"
- "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=${HTTP_ENTRYPOINT:-web}"
- "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE:-https-redirect@docker}"
# Service definition
- "traefik.http.services.${CONTAINER_NAME:-gitea}-svc.loadbalancer.server.port=3000"
networks:
proxy-net:
name: ${PROXY_NETWORK:-proxy-net}
external: true