feat(gitea): refactor configuration to use structured app_config and add TLS support

This commit is contained in:
2025-05-09 22:21:33 +02:00
parent 9de7d52192
commit 17a54f6792
13 changed files with 487 additions and 206 deletions
+22 -10
View File
@@ -64,19 +64,31 @@ module "gitea" {
backup_retention_days = local.local_backup_retention_days
backup_cron_schedule = local.gitea_sql_backup_cron_schedule
db_password = var.gitea_mysql_password
db_root_password = var.mysql_root_password
tag = local.gitea_version
fqdn = local.gitea_fqdn
app_name = "A13Labs git repository"
tag = local.gitea_version
fqdn = local.gitea_fqdn
smtp_host = local.scaleway_smtp_host
smtp_port = local.scaleway_smtp_port
smtp_username = var.scaleway_project_id
smtp_password = scaleway_iam_api_key.mail_app_api.secret_key
from_email = "gitea@${local.primary_domain}"
app_config = {
app_name = "A13Labs git repository"
domain = local.gitea_fqdn
lfs_jwt_secret = var.gitea_lfs_jwt_secret
db_passwd = var.gitea_mysql_password
jwt_secret = var.gitea_jwt_secret
mail_from = "gitea@${local.primary_domain}"
no_reply_address = "no-reply@${local.primary_domain}"
smtp_user = var.scaleway_project_id
db_password = var.gitea_mysql_password
smtp_host = local.scaleway_smtp_host
smtp_port = local.scaleway_smtp_port
smtp_user = var.scaleway_project_id
smtp_passwd = scaleway_iam_api_key.mail_app_api.secret_key
secret_key = var.gitea_secret_key
internal_token = var.gitea_internal_token
disable_ssh = false
ssh_port = 22
disable_registration = true
}
}
module "sftpgo" {
+24
View File
@@ -82,3 +82,27 @@ variable "root_ca_key" {
type = string
sensitive = true
}
variable "gitea_lfs_jwt_secret" {
description = "Gitea LFS JWT secret"
type = string
sensitive = true
}
variable "gitea_secret_key" {
description = "Gitea secret key"
type = string
sensitive = true
}
variable "gitea_internal_token" {
description = "Gitea internal token"
type = string
sensitive = true
}
variable "gitea_jwt_secret" {
description = "Gitea JWT secret"
type = string
sensitive = true
}
+4
View File
@@ -24,3 +24,7 @@ TF_VAR_mail_crypt_public_key=$DOVECOT_CRYPT_PUB_KEY_FILE
TF_VAR_sftpgo_admin_password=$SFTPGO_ADMIN_PASSWORD
TF_VAR_root_ca_pem=$K8S_ROOT_CA_PEM
TF_VAR_root_ca_key=$K8S_ROOT_CA_KEY
TF_VAR_gitea_lfs_jwt_secret=$GITEA_LFS_JWT_SECRET
TF_VAR_gitea_secret_key=$GITEA_SECRET_KEY
TF_VAR_gitea_internal_token=$GITEA_INTERNAL_TOKEN
TF_VAR_gitea_jwt_secret=$GITEA_JWT_SECRET