Compare commits

..

3 Commits

3 changed files with 230 additions and 82 deletions

View File

@ -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]
}

View File

@ -0,0 +1,61 @@
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 "kosync" {
source = "../quadlet-app"
wait_on = var.wait_on
server_ip = var.server_ip
ssh_private_key_path = var.ssh_private_key_path
app_name = "kosync"
image = "docker.io/koreader/kosync:latest"
ports = ["17200:17200"]
volumes = [
"/opt/storage/data/kosync/logs/app:/app/koreader-sync-server/logs:Z",
"/opt/storage/data/kosync/logs/redis:/var/log/redis:Z",
"/opt/storage/data/kosync/data/redis:/var/lib/redis:Z",
]
environment = {
ENABLE_USER_REGISTRATION = "true"
GIN_ENV = "production"
}
# Healthcheck over plain HTTP (port 17200) since HAProxy handles TLS
healthcmd = "curl -sf -H \"Accept: application/vnd.koreader.v1+json\" http://127.0.0.1:17200/healthcheck | grep -q '\"state\":\"OK\"'"
haproxy_services = [
{
name = "kosync"
domain = "kosync.${var.server_domain}"
port = "17200"
host = "127.0.0.1"
tls = false
},
]
}
output "app_urls" {
value = module.kosync.app_urls
}
output "installed" {
value = true
depends_on = [module.kosync.installed]
}

View File

@ -211,6 +211,22 @@ module "zot" {
# rabbitmq_password = module.rabbitmq.password # rabbitmq_password = module.rabbitmq.password
#} #}
module "kosync" {
wait_on = null_resource.is_up
source = "../../quadlets/modules/kosync"
server_ip = var.server
server_domain = var.server_domain
ssh_private_key_path = var.ssh_private_key_path
}
module "calibre-web-automated" {
wait_on = null_resource.is_up
source = "../../quadlets/modules/calibre-web-automated"
server_ip = var.server
server_domain = var.server_domain
ssh_private_key_path = var.ssh_private_key_path
}
module "beets" { module "beets" {
wait_on = null_resource.is_up wait_on = null_resource.is_up
source = "../../quadlets/modules/beets" source = "../../quadlets/modules/beets"
@ -282,6 +298,14 @@ output "tmail_web_app_urls" {
value = module.tmail-web.app_urls value = module.tmail-web.app_urls
} }
output "kosync_app_urls" {
value = module.kosync.app_urls
}
output "calibre_web_automated_app_urls" {
value = module.calibre-web-automated.app_urls
}
#output "plane_credentials" { #output "plane_credentials" {
#value = module.plane.credentials #value = module.plane.credentials
#sensitive = true #sensitive = true