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