Compare commits
No commits in common. "852c60a5400b59a5679ea451a7fbd23b5cedeff7" and "b9acac33e276ab5d7ad0a54d3d12fe87d1a3c1ba" have entirely different histories.
852c60a540
...
b9acac33e2
|
|
@ -1,63 +0,0 @@
|
||||||
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]
|
|
||||||
}
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
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]
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
variable "hcloud_token" {
|
variable "hcloud_token" {
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "hdns_token" {
|
variable "hdns_token" {
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ variable "ssh_private_key_path" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "server" {
|
variable "server" {
|
||||||
default = "mars"
|
default = "mars"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "server_domain" {
|
variable "server_domain" {
|
||||||
|
|
@ -31,12 +31,12 @@ variable "ghcr_token" {}
|
||||||
|
|
||||||
resource "null_resource" "is_up" {
|
resource "null_resource" "is_up" {
|
||||||
connection {
|
connection {
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
host = var.server
|
host = var.server
|
||||||
user = "fourlights"
|
user = "fourlights"
|
||||||
timeout = "10m"
|
timeout = "10m"
|
||||||
agent = true
|
agent = true
|
||||||
agent_identity = var.ssh_private_key_path
|
agent_identity = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "remote-exec" {
|
provisioner "remote-exec" {
|
||||||
|
|
@ -48,35 +48,35 @@ resource "null_resource" "is_up" {
|
||||||
|
|
||||||
module "containers-network" {
|
module "containers-network" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/network"
|
source = "../../quadlets/network"
|
||||||
|
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
|
|
||||||
name = "containers"
|
name = "containers"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "minio" {
|
module "minio" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/minio"
|
source = "../../quadlets/modules/minio"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
https = true
|
https = true
|
||||||
}
|
}
|
||||||
|
|
||||||
module "valkey" {
|
module "valkey" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/valkey"
|
source = "../../quadlets/modules/valkey"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
module "affine" {
|
module "affine" {
|
||||||
wait_on = module.postgres.installed
|
wait_on = module.postgres.installed
|
||||||
source = "../../quadlets/modules/affine"
|
source = "../../quadlets/modules/affine"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
|
|
||||||
# Pass postgres password for database connection
|
# Pass postgres password for database connection
|
||||||
|
|
@ -84,32 +84,32 @@ module "affine" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "oci-proxy" {
|
module "oci-proxy" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/oci-proxy"
|
source = "../../quadlets/modules/oci-proxy"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
module "arcane" {
|
module "arcane" {
|
||||||
wait_on = module.oci-proxy.installed
|
wait_on = module.oci-proxy.installed
|
||||||
source = "../../quadlets/modules/arcane"
|
source = "../../quadlets/modules/arcane"
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
module "qdrant" {
|
module "qdrant" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/qdrant"
|
source = "../../quadlets/modules/qdrant"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
}
|
}
|
||||||
|
|
||||||
module "documentdb" {
|
module "documentdb" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/documentdb"
|
source = "../../quadlets/modules/documentdb"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,16 +122,16 @@ module "documentdb" {
|
||||||
#}
|
#}
|
||||||
|
|
||||||
module "postgres" {
|
module "postgres" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/postgres"
|
source = "../../quadlets/modules/postgres"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
module "rabbitmq" {
|
module "rabbitmq" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/rabbitmq"
|
source = "../../quadlets/modules/rabbitmq"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,44 +153,44 @@ module "rabbitmq" {
|
||||||
#}
|
#}
|
||||||
|
|
||||||
module "gonic" {
|
module "gonic" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/gonic"
|
source = "../../quadlets/modules/gonic"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
module "tmail-web" {
|
module "tmail-web" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/tmail-web"
|
source = "../../quadlets/modules/tmail-web"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
server_url = "https://mail.binarysunset.dev"
|
server_url = "https://mail.binarysunset.dev"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "navidrome" {
|
module "navidrome" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/navidrome"
|
source = "../../quadlets/modules/navidrome"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
}
|
}
|
||||||
|
|
||||||
module "mopidy" {
|
module "mopidy" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/mopidy"
|
source = "../../quadlets/modules/mopidy"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
}
|
}
|
||||||
|
|
||||||
module "zot" {
|
module "zot" {
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/zot"
|
source = "../../quadlets/modules/zot"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
}
|
}
|
||||||
|
|
||||||
# Deploy Plane after all dependencies are ready
|
# Deploy Plane after all dependencies are ready
|
||||||
|
|
@ -211,49 +211,33 @@ 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"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
module "deeptutor" {
|
module "deeptutor" {
|
||||||
count = 0
|
count = 0
|
||||||
wait_on = null_resource.is_up
|
wait_on = null_resource.is_up
|
||||||
source = "../../quadlets/modules/deeptutor"
|
source = "../../quadlets/modules/deeptutor"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
output "psql_pw" {
|
output "psql_pw" {
|
||||||
value = module.postgres.password
|
value = module.postgres.password
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
module "forgejo" {
|
module "forgejo" {
|
||||||
wait_on = module.postgres.installed
|
wait_on = module.postgres.installed
|
||||||
source = "../../quadlets/modules/forgejo"
|
source = "../../quadlets/modules/forgejo"
|
||||||
server_ip = var.server
|
server_ip = var.server
|
||||||
server_domain = var.server_domain
|
server_domain = var.server_domain
|
||||||
ssh_private_key_path = var.ssh_private_key_path
|
ssh_private_key_path = var.ssh_private_key_path
|
||||||
|
|
||||||
# Pass postgres password for database connection
|
# Pass postgres password for database connection
|
||||||
|
|
@ -265,8 +249,8 @@ output "minio_app_urls" {
|
||||||
}
|
}
|
||||||
|
|
||||||
output "qdrant_api_key" {
|
output "qdrant_api_key" {
|
||||||
value = module.qdrant.api_key
|
value = module.qdrant.api_key
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
#output "plane_app_urls" {
|
#output "plane_app_urls" {
|
||||||
|
|
@ -298,14 +282,6 @@ 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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue