Files
a13labs.infra/terraform/modules/apps/sftpgo/config.tf
T
alexandre.pires e6e85b00f7 feat(mail): enhance mail configuration with getmail and dovecot settings
- Added getmail configuration generation using template files.
- Introduced postfix and dovecot configuration checksums for deployment.
- Created new dovecot configuration file and sieve script for email handling.
- Updated main.tf to utilize local variables for configuration management.
- Removed redundant external password hasher from main.tf.

feat(nginx): improve nginx configuration management

- Centralized nginx configuration into a local variable with checksum.
- Created separate config maps for default website configurations.
- Updated deployment to utilize new configuration structure.

feat(sftpgo): add SFTPGo application deployment

- Introduced SFTPGo with Kubernetes resources including namespace, config maps, and secrets.
- Configured SFTPGo with SMTP settings and AWS credentials.
- Implemented health checks and volume mounts for persistent storage.

refactor(seafile): remove Seafile module

- Deleted Seafile module and associated resources as part of cleanup.
2025-05-05 00:47:36 +02:00

82 lines
1.6 KiB
Terraform

locals {
data_path = "${var.persistent_folder}/sftpgo"
sftpgo_config = {
"common" : {
"defender" : {
"enabled" : false
}
},
"sftpd" : {
"bindings" : [
{
"port" : 0
}
]
},
"webdavd" : {
"bindings" : [
{
"port" : 8081,
"address" : "0.0.0.0"
}
]
},
"data_provider" : {
"create_default_admin" : true,
"backups_path" : "/var/lib/sftpgo/backup"
},
"httpd" : {
"bindings" : [
{
"port" : 8080,
"address" : "0.0.0.0",
"branding" : {
"web_client" : {
"name" : "alexpires.me cloud",
"short_name" : "alexpires.me"
},
"web_admin" : {
"name" : "alexpires.me cloud",
"short_name" : "alexpires.me"
}
}
}
],
"web_root" : "/storage",
},
"telemetry" : {
"bind_port" : 10000,
"bind_address" : "0.0.0.0"
},
"mfa" : {
"totp" : [
{
"name" : "Default",
"issuer" : "alexpires.me",
"algo" : "sha1"
}
]
},
"smtp" : {
"host" : var.smtp_host,
"port" : var.smtp_port,
"from" : var.from_email
"encryption" : 1,
"domain" : "alexpires.me"
},
"plugins" : []
}
config = jsonencode(local.sftpgo_config)
config_checksum = sha256(local.config)
credentials = templatefile("${path.module}/resources/aws.tpl", {
access_key = var.access_key
secret_key = var.secret_key
})
credentials_checksum = sha256(local.credentials)
}