From 0a4620a7a514e46c239e7436ee02b12c1c410b95 Mon Sep 17 00:00:00 2001 From: Thomas Rijpstra Date: Thu, 23 Jul 2026 15:48:36 +0200 Subject: [PATCH] feat(quadlets): add calibre-web-automated Terraform module --- .../modules/calibre-web-automated/main.tf | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 quadlets/modules/calibre-web-automated/main.tf diff --git a/quadlets/modules/calibre-web-automated/main.tf b/quadlets/modules/calibre-web-automated/main.tf new file mode 100644 index 0000000..eee58fc --- /dev/null +++ b/quadlets/modules/calibre-web-automated/main.tf @@ -0,0 +1,63 @@ +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 "calibre-web-automated" { + source = "../quadlet-app" + wait_on = var.wait_on + + server_ip = var.server_ip + ssh_private_key_path = var.ssh_private_key_path + + app_name = "calibre-web-automated" + # Docker Hub 'latest' currently points at GitHub release v4.0.6 + image = "docker.io/crocodilestick/calibre-web-automated:latest" + ports = ["8083:8083"] + volumes = [ + "/opt/storage/data/calibre-web-automated:/config:Z", + "/opt/storage/media/books:/calibre-library:Z", + "/opt/storage/media/books-ingest:/cwa-book-ingest:Z", + ] + + environment = { + PUID = "1001" + PGID = "1001" + TZ = "Europe/Amsterdam" + NETWORK_SHARE_MODE = "false" + } + + healthcmd = "curl -sf http://127.0.0.1:8083/ > /dev/null || exit 1" + + haproxy_services = [ + { + name = "calibre-web" + domain = "calibre-web.${var.server_domain}" + port = "8083" + host = "127.0.0.1" + tls = false + }, + ] +} + +output "app_urls" { + value = module.calibre-web-automated.app_urls +} + +output "installed" { + value = true + depends_on = [module.calibre-web-automated.installed] +}