Files
ansible-playbooks/roles/gitea/defaults/main.yml
T
Clément Désiles 5efc0b0d6e fix(nginx): make Let's Encrypt opt-in per service
certbot cannot issue for internal hostnames (*.nas.local), which made
nginx-enabled services with internal names fail on deploy.

Add a <service>_nginx_letsencrypt flag (default false) and computed
<service>_nginx_ssl_certificate/_key paths: when off the vhost uses the
shared self-signed cert (nginx_default_ssl_cert), when on it uses the
Let's Encrypt lineage. Gate the certbot include on the flag and apply the
pattern to all service roles (deluge, fdroid, gitea, grafana, immich,
metabase, ntfy, prowlarr, radarr, seerr, static_web, uptime_kuma).
2026-09-21 10:04:47 +02:00

47 lines
1.4 KiB
YAML

---
# Gitea version
gitea_version: "latest"
# Network configuration
gitea_port: 3100
# Container image
gitea_image: gitea/gitea
# Data directory
gitea_data_dir: "{{ podman_projects_dir }}/gitea/data"
# Database configuration (PostgreSQL)
gitea_postgres_db_name: gitea
gitea_postgres_user: gitea
gitea_postgres_schema: gitea
# gitea_postgres_password: "" # Required - set in inventory
# Application configuration
gitea_app_name: "Gitea"
gitea_domain: git.nas.local
gitea_root_url: "https://{{ gitea_domain }}"
# Disable SSH (HTTPS only for Git operations)
gitea_disable_ssh: true
# Disable registration
gitea_disable_registration: false
# Nginx reverse proxy configuration
gitea_nginx_enabled: true
gitea_nginx_hostname: "{{ gitea_domain }}"
# Let's Encrypt (certbot) requires a publicly-resolvable hostname. Internal
# names (e.g. *.nas.local) cannot get a public cert: leave this false to use
# the shared self-signed cert (nginx_default_ssl_cert). Set true once a public
# DNS record points at the host.
gitea_nginx_letsencrypt: false
gitea_nginx_ssl_certificate: >-
{{ gitea_nginx_letsencrypt | ternary(
'/etc/letsencrypt/live/' ~ gitea_nginx_hostname ~ '/fullchain.pem',
nginx_default_ssl_cert) }}
gitea_nginx_ssl_certificate_key: >-
{{ gitea_nginx_letsencrypt | ternary(
'/etc/letsencrypt/live/' ~ gitea_nginx_hostname ~ '/privkey.pem',
nginx_default_ssl_key) }}