devops/quadlets/modules/zot/main.tf

59 lines
1.0 KiB
HCL

variable "wait_on" {
type = any
description = "Resources to wait on"
default = true
}
variable "server_ip" {
type = string
}
variable "ssh_private_key_path" {
type = string
}
variable "server_domain" {
type = string
}
module "zot" {
source = "../quadlet-app"
wait_on = var.wait_on
server_ip = var.server_ip
ssh_private_key_path = var.ssh_private_key_path
app_name = "zot"
image = "ghcr.io/project-zot/zot:latest"
ports = ["5000:5000"]
volumes = [
"/opt/storage/data/zot/config.json:/etc/zot/config.json:Z",
"/opt/storage/data/zot:/var/lib/registry:Z",
]
environment = {
ND_LOGLEVEL="info"
ND_ENABLEINSIGHTSCOLLECTOR="false"
}
haproxy_services = [
{
name = "registry"
domain = "registry.${var.server_domain}"
port = "5000"
host = "127.0.0.1"
tls = false
},
]
}
output "app_urls" {
value = module.zot.app_urls
}
output "installed" {
value = true
depends_on = [module.zot.installed]
}