From 1c297637f1cb5f241b2c29a0ab76ae835b62c006 Mon Sep 17 00:00:00 2001 From: wizzdom Date: Thu, 22 Jan 2026 16:59:51 +0000 Subject: [PATCH 1/3] add roundcube --- jobs/services/mail/roundcube.hcl | 108 ++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 8 deletions(-) diff --git a/jobs/services/mail/roundcube.hcl b/jobs/services/mail/roundcube.hcl index 9fadd8a..00e4ab8 100644 --- a/jobs/services/mail/roundcube.hcl +++ b/jobs/services/mail/roundcube.hcl @@ -7,7 +7,7 @@ job "roundcube" { } group "roundcube" { - count = 1 + count = 2 network { port "http" { @@ -16,9 +16,13 @@ job "roundcube" { port "fpm" { to = 9000 } - port "db" { - to = 5432 - } + } + + update { + max_parallel = 1 + health_check = "checks" + min_healthy_time = "10s" + healthy_deadline = "5m" } service { @@ -92,7 +96,8 @@ EOH volumes = [ "/storage/nomad/${NOMAD_JOB_NAME}/${NOMAD_TASK_NAME}:/var/www/html", - "local/rb-custom.php:/var/roundcube/config/rb-custom.php" + "local/rb-custom.php:/var/roundcube/config/rb-custom.php", + "local/php.ini:/usr/local/etc/php/conf.d/php.ini" ] } @@ -101,8 +106,10 @@ EOH env = true data = < Date: Sat, 24 Jan 2026 00:38:20 +0000 Subject: [PATCH 2/3] su-listmonk --- jobs/socs/su-listmonk.hcl | 53 +++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/jobs/socs/su-listmonk.hcl b/jobs/socs/su-listmonk.hcl index c4193da..6156ec8 100644 --- a/jobs/socs/su-listmonk.hcl +++ b/jobs/socs/su-listmonk.hcl @@ -10,10 +10,13 @@ job "su-listmonk" { network { mode = "bridge" port "http" {} + } - port "db" { - to = 5432 - } + update { + max_parallel = 1 + health_check = "checks" + min_healthy_time = "10s" + healthy_deadline = "5m" } service { @@ -48,7 +51,7 @@ job "su-listmonk" { args = ["-c", "./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"] # empty config so envvars are used instead volumes = [ - "/storage/nomad/su-listmonk/uploads:/uploads", + "/storage/nomad/${NOMAD_JOB_NAME}/uploads:/uploads", ] } @@ -67,8 +70,10 @@ LISTMONK_app__public_url = {{ env "NOMAD_META_domain" }} LISTMONK_db__user = {{ key "su/listmonk/db/username" }} LISTMONK_db__password = {{ key "su/listmonk/db/password" }} LISTMONK_db__database = {{ key "su/listmonk/db/name" }} -LISTMONK_db__host = {{ env "NOMAD_HOST_IP_db" }} -LISTMONK_db__port = {{ env "NOMAD_HOST_PORT_db" }} +{{- range service "su-listmonk-db" }} +LISTMONK_db__host = {{ .Address }} +LISTMONK_db__port = {{ .Port }} +{{- end }} LISTMONK_db__ssl_mode = disable LISTMONK_db__max_open = 25 LISTMONK_db__max_idle = 25 @@ -101,8 +106,10 @@ EOH destination = "local/wait.env" env = true data = < Date: Sat, 24 Jan 2026 00:38:42 +0000 Subject: [PATCH 3/3] cleanup --- jobs/services/mail/roundcube.hcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jobs/services/mail/roundcube.hcl b/jobs/services/mail/roundcube.hcl index 00e4ab8..20bd631 100644 --- a/jobs/services/mail/roundcube.hcl +++ b/jobs/services/mail/roundcube.hcl @@ -106,10 +106,10 @@ EOH env = true data = <