Small cleanups
This commit is contained in:
parent
9ba2ed8ace
commit
ced7c7cdd5
|
@ -7,6 +7,16 @@ job "onlyoffice" {
|
||||||
|
|
||||||
group "onlyoffice" {
|
group "onlyoffice" {
|
||||||
|
|
||||||
|
shutdown_delay = "6s"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ephemeral_disk {
|
||||||
|
# Use minimal ephemeral disk
|
||||||
|
size = 101
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
network {
|
network {
|
||||||
mode = "bridge"
|
mode = "bridge"
|
||||||
# This can be used to ensure rabbitmq has a stable hostname
|
# This can be used to ensure rabbitmq has a stable hostname
|
||||||
|
@ -35,6 +45,16 @@ job "onlyoffice" {
|
||||||
name = "onlyoffice"
|
name = "onlyoffice"
|
||||||
port = 8819
|
port = 8819
|
||||||
|
|
||||||
|
meta {
|
||||||
|
alloc = "${NOMAD_ALLOC_INDEX}"
|
||||||
|
datacenter = "${NOMAD_DC}"
|
||||||
|
group = "${NOMAD_GROUP_NAME}"
|
||||||
|
job = "${NOMAD_JOB_NAME}"
|
||||||
|
namespace = "${NOMAD_NAMESPACE}"
|
||||||
|
node = "${node.unique.name}"
|
||||||
|
region = "${NOMAD_REGION}"
|
||||||
|
}
|
||||||
|
|
||||||
connect {
|
connect {
|
||||||
sidecar_service {
|
sidecar_service {
|
||||||
proxy {
|
proxy {
|
||||||
|
@ -74,7 +94,7 @@ job "onlyoffice" {
|
||||||
path = "/healthcheck"
|
path = "/healthcheck"
|
||||||
expose = true
|
expose = true
|
||||||
interval = "30s"
|
interval = "30s"
|
||||||
timeout = "8s"
|
timeout = "5s"
|
||||||
|
|
||||||
check_restart {
|
check_restart {
|
||||||
limit = 15
|
limit = 15
|
||||||
|
@ -100,8 +120,9 @@ job "onlyoffice" {
|
||||||
|
|
||||||
config {
|
config {
|
||||||
image = "danielberteaud/onlyoffice-docserver:8.0.1-2"
|
image = "danielberteaud/onlyoffice-docserver:8.0.1-2"
|
||||||
pids_limit = 200
|
|
||||||
readonly_rootfs = true
|
readonly_rootfs = true
|
||||||
|
|
||||||
|
pids_limit = 200
|
||||||
volumes = [
|
volumes = [
|
||||||
"local/:/tmp",
|
"local/:/tmp",
|
||||||
"local/metrics.js:/var/www/onlyoffice/documentserver/server/Metrics/config/config.js:ro"
|
"local/metrics.js:/var/www/onlyoffice/documentserver/server/Metrics/config/config.js:ro"
|
||||||
|
@ -229,7 +250,6 @@ _EOT
|
||||||
config {
|
config {
|
||||||
image = "danielberteaud/valkey:24.4-1"
|
image = "danielberteaud/valkey:24.4-1"
|
||||||
readonly_rootfs = true
|
readonly_rootfs = true
|
||||||
force_pull = true
|
|
||||||
pids_limit = 100
|
pids_limit = 100
|
||||||
args = ["/local/valkey.conf"]
|
args = ["/local/valkey.conf"]
|
||||||
}
|
}
|
||||||
|
@ -259,7 +279,6 @@ _EOT
|
||||||
|
|
||||||
task "rabbitmq" {
|
task "rabbitmq" {
|
||||||
driver = "docker"
|
driver = "docker"
|
||||||
#user = 100
|
|
||||||
|
|
||||||
lifecycle {
|
lifecycle {
|
||||||
hook = "prestart"
|
hook = "prestart"
|
||||||
|
@ -268,8 +287,9 @@ _EOT
|
||||||
|
|
||||||
config {
|
config {
|
||||||
image = "rabbitmq:alpine"
|
image = "rabbitmq:alpine"
|
||||||
pids_limit = 100
|
|
||||||
readonly_rootfs = true
|
readonly_rootfs = true
|
||||||
|
|
||||||
|
pids_limit = 100
|
||||||
volumes = [
|
volumes = [
|
||||||
"local/rabbitmq.conf:/etc/rabbitmq/conf.d/30-oods.conf"
|
"local/rabbitmq.conf:/etc/rabbitmq/conf.d/30-oods.conf"
|
||||||
]
|
]
|
||||||
|
@ -292,8 +312,6 @@ _EOT
|
||||||
template {
|
template {
|
||||||
data = <<_EOT
|
data = <<_EOT
|
||||||
listeners.tcp.1 = 127.0.0.1:5672
|
listeners.tcp.1 = 127.0.0.1:5672
|
||||||
# Set watermark to 95% of the mem allocated to the container
|
|
||||||
#vm_memory_high_watermark.absolute = 155398932
|
|
||||||
vm_memory_high_watermark.relative = 0.999
|
vm_memory_high_watermark.relative = 0.999
|
||||||
_EOT
|
_EOT
|
||||||
destination = "local/rabbitmq.conf"
|
destination = "local/rabbitmq.conf"
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
[[ $c := merge .oo.ds . -]]
|
|
||||||
|
|
||||||
job "[[ .instance ]]" {
|
job "[[ .instance ]]" {
|
||||||
|
|
||||||
[[- $c := merge .oo.ds .oo . ]]
|
[[- $c := merge .oo . ]]
|
||||||
|
|
||||||
[[ template "common/job_start" $c ]]
|
[[ template "common/job_start" $c ]]
|
||||||
|
|
||||||
group "onlyoffice" {
|
group "onlyoffice" {
|
||||||
|
|
||||||
|
[[- $c := merge .oo.ds $c ]]
|
||||||
|
[[ template "common/group_start" $c ]]
|
||||||
|
|
||||||
network {
|
network {
|
||||||
mode = "bridge"
|
mode = "bridge"
|
||||||
# This can be used to ensure rabbitmq has a stable hostname
|
# This can be used to ensure rabbitmq has a stable hostname
|
||||||
|
@ -21,6 +22,7 @@ job "[[ .instance ]]" {
|
||||||
name = "[[ .instance ]][[ $c.consul.suffix ]]"
|
name = "[[ .instance ]][[ $c.consul.suffix ]]"
|
||||||
port = 8819
|
port = 8819
|
||||||
|
|
||||||
|
[[ template "common/service_meta" $c ]]
|
||||||
[[ template "common/connect" $c ]]
|
[[ template "common/connect" $c ]]
|
||||||
|
|
||||||
check {
|
check {
|
||||||
|
@ -28,8 +30,8 @@ job "[[ .instance ]]" {
|
||||||
type = "http"
|
type = "http"
|
||||||
path = "/healthcheck"
|
path = "/healthcheck"
|
||||||
expose = true
|
expose = true
|
||||||
interval = "30s"
|
interval = "[[ $c.consul.check.interval ]]"
|
||||||
timeout = "8s"
|
timeout = "[[ $c.consul.check.timeout ]]"
|
||||||
|
|
||||||
check_restart {
|
check_restart {
|
||||||
limit = 15
|
limit = 15
|
||||||
|
@ -48,9 +50,8 @@ job "[[ .instance ]]" {
|
||||||
leader = true
|
leader = true
|
||||||
|
|
||||||
config {
|
config {
|
||||||
image = "[[ .oo.ds.image ]]"
|
[[ template "common/image" $c ]]
|
||||||
pids_limit = 200
|
pids_limit = 200
|
||||||
readonly_rootfs = true
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"local/:/tmp",
|
"local/:/tmp",
|
||||||
"local/metrics.js:/var/www/onlyoffice/documentserver/server/Metrics/config/config.js:ro"
|
"local/metrics.js:/var/www/onlyoffice/documentserver/server/Metrics/config/config.js:ro"
|
||||||
|
@ -115,7 +116,6 @@ _EOT
|
||||||
|
|
||||||
task "rabbitmq" {
|
task "rabbitmq" {
|
||||||
driver = "[[ $c.nomad.driver ]]"
|
driver = "[[ $c.nomad.driver ]]"
|
||||||
#user = 100
|
|
||||||
|
|
||||||
lifecycle {
|
lifecycle {
|
||||||
hook = "prestart"
|
hook = "prestart"
|
||||||
|
@ -123,9 +123,8 @@ _EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
config {
|
config {
|
||||||
image = "[[ $c.image ]]"
|
[[ template "common/image" $c ]]
|
||||||
pids_limit = 100
|
pids_limit = 100
|
||||||
readonly_rootfs = true
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"local/rabbitmq.conf:/etc/rabbitmq/conf.d/30-oods.conf"
|
"local/rabbitmq.conf:/etc/rabbitmq/conf.d/30-oods.conf"
|
||||||
]
|
]
|
||||||
|
@ -136,8 +135,6 @@ _EOT
|
||||||
template {
|
template {
|
||||||
data = <<_EOT
|
data = <<_EOT
|
||||||
listeners.tcp.1 = 127.0.0.1:5672
|
listeners.tcp.1 = 127.0.0.1:5672
|
||||||
# Set watermark to 95% of the mem allocated to the container
|
|
||||||
#vm_memory_high_watermark.absolute = [[ mul .oo.rabbitmq.resources.memory 996147 ]]
|
|
||||||
vm_memory_high_watermark.relative = 0.999
|
vm_memory_high_watermark.relative = 0.999
|
||||||
_EOT
|
_EOT
|
||||||
destination = "local/rabbitmq.conf"
|
destination = "local/rabbitmq.conf"
|
||||||
|
|
Loading…
Reference in New Issue