Add self-contained Gitea Git service with PostgreSQL integration
- Implements complete Gitea Git service following rick-infra self-contained architecture - Uses PostgreSQL infrastructure role as dependency and manages own database/user - Native Arch Linux installation via pacman packages - Automatic database setup (gitea database and user creation) - SystemD service with security hardening and proper dependency management - Caddy reverse proxy integration deployed to sites-enabled directory - SSH server on port 2222 with automatic host key generation - Production-ready with LFS support, security headers, and HTTPS via Caddy - Follows simplified configuration approach with essential variables only - Self-contained pattern: service manages complete setup independently
This commit is contained in:
76
roles/gitea/defaults/main.yml
Normal file
76
roles/gitea/defaults/main.yml
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
# =================================================================
|
||||
# Gitea Git Service Role - Simplified Configuration
|
||||
# =================================================================
|
||||
# Self-contained Gitea installation that manages its own database
|
||||
# Follows rick-infra patterns for pragmatic service deployment
|
||||
|
||||
# =================================================================
|
||||
# Service Configuration
|
||||
# =================================================================
|
||||
|
||||
# Service Management
|
||||
gitea_service_enabled: true
|
||||
gitea_service_state: "started"
|
||||
|
||||
# User and Paths (Arch Linux defaults)
|
||||
gitea_user: "git"
|
||||
gitea_group: "git"
|
||||
gitea_home: "/var/lib/gitea"
|
||||
|
||||
# Network Configuration
|
||||
gitea_http_port: 3000
|
||||
gitea_ssh_port: 2222
|
||||
|
||||
# =================================================================
|
||||
# Domain and Caddy Integration
|
||||
# =================================================================
|
||||
|
||||
# Domain setup (follows rick-infra pattern)
|
||||
gitea_subdomain: "git"
|
||||
gitea_domain: "{{ caddy_domain | default('localhost') }}"
|
||||
gitea_full_domain: "{{ gitea_subdomain }}.{{ gitea_domain }}"
|
||||
|
||||
# Caddy integration
|
||||
caddy_sites_enabled_dir: "/etc/caddy/sites-enabled"
|
||||
|
||||
# =================================================================
|
||||
# Database Configuration (Self-Contained)
|
||||
# =================================================================
|
||||
|
||||
# Gitea manages its own database
|
||||
gitea_db_type: "postgres"
|
||||
gitea_db_host: "127.0.0.1"
|
||||
gitea_db_port: 5432
|
||||
gitea_db_name: "gitea"
|
||||
gitea_db_user: "gitea"
|
||||
gitea_db_password: "{{ vault_gitea_db_password }}"
|
||||
|
||||
# =================================================================
|
||||
# Application Settings
|
||||
# =================================================================
|
||||
|
||||
# Basic Gitea configuration
|
||||
gitea_app_name: "Gitea: Git with a cup of tea"
|
||||
gitea_run_mode: "prod"
|
||||
|
||||
# Repository settings
|
||||
gitea_default_branch: "main"
|
||||
gitea_enable_lfs: true
|
||||
|
||||
# Security settings
|
||||
gitea_disable_registration: false
|
||||
gitea_require_signin: false
|
||||
|
||||
# SSH settings
|
||||
gitea_start_ssh_server: true
|
||||
|
||||
# =================================================================
|
||||
# Rick-Infra Integration Notes
|
||||
# =================================================================
|
||||
# This role:
|
||||
# - Depends on PostgreSQL infrastructure role
|
||||
# - Creates its own database and user
|
||||
# - Deploys Caddy configuration to sites-enabled
|
||||
# - Uses native Arch Linux Gitea package
|
||||
# - Follows self-contained service pattern
|
||||
Reference in New Issue
Block a user