Minor cleanup

This commit is contained in:
Daniel Berteaud 2023-11-20 12:06:28 +01:00
parent 6db813b7c8
commit f42e801da2
2 changed files with 39 additions and 39 deletions

View File

@ -10,20 +10,20 @@ job "[[ .paperless.instance ]]" {
}
volume "data" {
type = "[[ .paperless.volumes.data.type ]]"
source = "[[ .paperless.volumes.data.source ]]"
type = "[[ .paperless.volumes.data.type ]]"
source = "[[ .paperless.volumes.data.source ]]"
[[- if ne .paperless.volumes.data.type "host" ]]
access_mode = "single-node-writer"
access_mode = "single-node-writer"
attachment_mode = "file-system"
[[- end ]]
}
[[- if .paperless.consumer.enabled ]]
volume "input" {
type = "[[ .paperless.volumes.input.type ]]"
source = "[[ .paperless.volumes.input.source ]]"
type = "[[ .paperless.volumes.input.type ]]"
source = "[[ .paperless.volumes.input.source ]]"
[[- if ne .paperless.volumes.input.type "host" ]]
access_mode = "single-node-writer"
access_mode = "single-node-writer"
attachment_mode = "file-system"
[[- end ]]
}
@ -56,32 +56,32 @@ job "[[ .paperless.instance ]]" {
driver = [[ $c.nomad.driver | toJSON ]]
config {
image = [[ $c.image | toJSON ]]
image = [[ $c.image | toJSON ]]
readonly_rootfs = true
pids_limit = 100
pids_limit = 100
}
vault {
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
disable_file = true
}
env {
PAPERLESS_MODE = "webserver"
PAPERLESS_MODE = "webserver"
PAPERLESS_BIND_ADDR = "127.0.0.1"
TMPDIR = "/alloc/tmp"
TMPDIR = "/alloc/tmp"
}
[[ template "common/file_env.tpl" merge $c.env .paperless.env ]]
volume_mount {
volume = "data"
volume = "data"
destination = "/data"
}
volume_mount {
volume = "input"
volume = "input"
destination = "/input"
}
@ -94,36 +94,36 @@ job "[[ .paperless.instance ]]" {
driver = [[ $c.nomad.driver | toJSON ]]
lifecycle {
hook = "prestart"
hook = "prestart"
sidecar = true
}
config {
image = [[ $c.image | toJSON ]]
image = [[ $c.image | toJSON ]]
readonly_rootfs = true
pids_limit = 100
pids_limit = 100
}
vault {
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
disable_file = true
}
env {
PAPERLESS_MODE = "consumer"
TMPDIR = "/alloc/tmp"
TMPDIR = "/alloc/tmp"
}
[[ template "common/file_env.tpl" merge $c.env .paperless.env ]]
volume_mount {
volume = "data"
volume = "data"
destination = "/data"
}
volume_mount {
volume = "input"
volume = "input"
destination = "/input"
}
@ -136,36 +136,36 @@ job "[[ .paperless.instance ]]" {
driver = [[ $c.nomad.driver | toJSON ]]
lifecycle {
hook = "prestart"
hook = "prestart"
sidecar = true
}
config {
image = [[ $c.image | toJSON ]]
image = [[ $c.image | toJSON ]]
readonly_rootfs = true
pids_limit = 100
pids_limit = 100
}
vault {
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
disable_file = true
}
env {
PAPERLESS_MODE = "scheduler"
TMPDIR = "/alloc/tmp"
TMPDIR = "/alloc/tmp"
}
[[ template "common/file_env.tpl" merge $c.env .paperless.env ]]
volume_mount {
volume = "data"
volume = "data"
destination = "/data"
}
volume_mount {
volume = "input"
volume = "input"
destination = "/input"
}
@ -177,36 +177,36 @@ job "[[ .paperless.instance ]]" {
driver = [[ $c.nomad.driver | toJSON ]]
lifecycle {
hook = "prestart"
hook = "prestart"
sidecar = true
}
config {
image = [[ $c.image | toJSON ]]
image = [[ $c.image | toJSON ]]
readonly_rootfs = true
pids_limit = 300
pids_limit = 300
}
vault {
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
policies = ["[[ .paperless.instance ]][[ .consul.suffix ]]"]
env = false
disable_file = true
}
env {
PAPERLESS_MODE = "task-queue"
TMPDIR = "/alloc/tmp"
TMPDIR = "/alloc/tmp"
}
[[ template "common/file_env.tpl" merge $c.env .paperless.env ]]
volume_mount {
volume = "data"
volume = "data"
destination = "/data"
}
volume_mount {
volume = "input"
volume = "input"
destination = "/input"
}

View File

@ -39,7 +39,7 @@ paperless:
# Resource allocation
resources:
cpu: 300
memory: 256
memory: 350
# The URL where BounCA will be available to users
public_url: https://paperless.example.org