Files
michaelschiemer/deployment/ansible/templates/gitea-app.ini.j2
Michael Schiemer 8f3c15ddbb fix(console): comprehensive TUI rendering fixes
- Fix Enter key detection: handle multiple Enter key formats (\n, \r, \r\n)
- Reduce flickering: lower render frequency from 60 FPS to 30 FPS
- Fix menu bar visibility: re-render menu bar after content to prevent overwriting
- Fix content positioning: explicit line positioning for categories and commands
- Fix line shifting: clear lines before writing, control newlines manually
- Limit visible items: prevent overflow with maxVisibleCategories/Commands
- Improve CPU usage: increase sleep interval when no events processed

This fixes:
- Enter key not working for selection
- Strong flickering of the application
- Menu bar not visible or being overwritten
- Top half of selection list not displayed
- Lines being shifted/misaligned
2025-11-10 11:06:07 +01:00

106 lines
4.0 KiB
Django/Jinja

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Gitea Configuration File
;; Generated by Ansible - DO NOT EDIT MANUALLY
;;
;; All Gitea configuration is now managed via app.ini instead of
;; environment variables for better reliability and maintainability.
;;
;; Migration from environment variables to app.ini:
;; - Cache now works correctly (environment variables had a bug in Gitea 1.25)
;; - All settings are versioned in Git
;; - Better documentation and maintainability
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
APP_NAME = Gitea: Git with a cup of tea
RUN_MODE = prod
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Server Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[server]
PROTOCOL = http
DOMAIN = {{ gitea_domain }}
HTTP_ADDR = 0.0.0.0
HTTP_PORT = 3000
ROOT_URL = https://{{ gitea_domain }}/
# LOCAL_ROOT_URL for internal access (Runner/Webhooks)
LOCAL_ROOT_URL = http://gitea:3000/
# Trust Traefik proxy (Docker network: 172.18.0.0/16)
PROXY_TRUSTED_PROXIES = 172.18.0.0/16,::1,127.0.0.1
DISABLE_SSH = false
START_SSH_SERVER = false
SSH_DOMAIN = {{ gitea_domain }}
SSH_PORT = {{ ssh_port | default(2222) }}
SSH_LISTEN_PORT = {{ ssh_listen_port | default(2222) }}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Database Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[database]
DB_TYPE = postgres
HOST = postgres:5432
NAME = {{ postgres_db | default('gitea') }}
USER = {{ postgres_user | default('gitea') }}
PASSWD = {{ postgres_password | default('gitea_password') }}
SSL_MODE = disable
# Connection pool settings to prevent "Timeout before authentication" errors
# These limit the number of concurrent connections and prevent connection pool exhaustion
# - MAX_OPEN_CONNS: Maximum number of open connections to the database
# - MAX_IDLE_CONNS: More warm connections to avoid constantly creating new sessions
# - CONN_MAX_LIFETIME: 10 minutes; idle connections are not recycled too quickly
# - CONN_MAX_IDLE_TIME: Clean up connections that are idle for too long
MAX_OPEN_CONNS = 50
MAX_IDLE_CONNS = 30
CONN_MAX_LIFETIME = 600
CONN_MAX_IDLE_TIME = 300
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Cache Configuration (Redis)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[cache]
ENABLED = true
ADAPTER = redis
# HOST must be a Redis connection string (as per Gitea documentation)
# Format: redis://:password@host:port/db?pool_size=100&idle_timeout=180s
# Using same format as queue CONN_STR for consistency
HOST = redis://:{{ redis_password }}@redis:6379/0?pool_size=100&idle_timeout=180s
# Cache configuration now works correctly in app.ini
# (Environment variables had a bug in Gitea 1.25 that connected to 127.0.0.1:6379 instead of redis:6379)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Session Configuration (Redis)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[session]
PROVIDER = redis
# PROVIDER_CONFIG must be a Redis connection string (as per Gitea documentation)
# Format: redis://:password@host:port/db?pool_size=100&idle_timeout=180s
# Using same format as cache HOST and queue CONN_STR for consistency
PROVIDER_CONFIG = redis://:{{ redis_password }}@redis:6379/0?pool_size=100&idle_timeout=180s
SAME_SITE = lax
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Queue Configuration (Redis)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[queue]
TYPE = redis
CONN_STR = redis://:{{ redis_password }}@redis:6379/0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Security Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[security]
INSTALL_LOCK = true
# Cookie security (only if ROOT_URL is https)
COOKIE_SECURE = true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Service Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[service]
DISABLE_REGISTRATION = {{ disable_registration | default(true) | lower }}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Actions Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[actions]
ENABLED = true