This commit is contained in:
Daniel Berteaud 2024-04-17 22:54:11 +02:00
parent 269e88b827
commit dd46ca542f
5 changed files with 25 additions and 11 deletions

View File

@ -21,4 +21,5 @@ exec uwsgi \
--workers ${LLNG_WORKERS} \
--cheaper-initial 2 \
--cheaper-algo spare \
--cheaper-step 1
--cheaper-step 1 \
--need-app

View File

@ -12,6 +12,19 @@ job "lemonldap-ng" {
shutdown_delay = "6s"
constraint {
operator = "distinct_hosts"
value = "true"
}
ephemeral_disk {
# Use minimal ephemeral disk
size = 101
}
constraint {
operator = "distinct_hosts"
@ -81,6 +94,7 @@ job "lemonldap-ng" {
grace = "5m"
}
}
tags = [
"traefik.http.routers.lemonldap-ng-portal.rule=Host(`sso.example.org`) && !PathRegexp(`^/index\\.psgi/(config|sessions)`)",
@ -139,9 +153,10 @@ job "lemonldap-ng" {
driver = "docker"
config {
image = "danielberteaud/lemonldap-ng:2.18.2-2"
image = "danielberteaud/lemonldap-ng:2.18.2-3"
readonly_rootfs = true
pids_limit = 200
pids_limit = 200
volumes = [
"secrets/lemonldap-ng.ini:/etc/lemonldap-ng/lemonldap-ng.ini:ro",
"local/init-db.sh:/entrypoint.d/20-initdb.sh:ro",

View File

@ -21,4 +21,5 @@ exec uwsgi \
--workers ${LLNG_WORKERS} \
--cheaper-initial 2 \
--cheaper-algo spare \
--cheaper-step 1
--cheaper-step 1 \
--need-app

View File

@ -4,9 +4,7 @@ job "[[ .instance ]]" {
group "lemonldap-ng" {
[[- $c := merge .llng.engine .llng . ]]
count = [[ $c.count ]]
shutdown_delay = "6s"
[[ template "common/group_start" $c ]]
[[ template "common/constraints" $c ]]
@ -54,11 +52,10 @@ job "[[ .instance ]]" {
[[ template "common/task.pgpooler" $c ]]
task "lemonldap-ng" {
driver = [[ $c.nomad.driver | toJSON ]]
driver = "[[ $c.nomad.driver ]]"
config {
image = [[ $c.image | toJSON ]]
readonly_rootfs = true
[[ template "common/image" $c ]]
pids_limit = 200
volumes = [
"secrets/lemonldap-ng.ini:/etc/lemonldap-ng/lemonldap-ng.ini:ro",

View File

@ -24,7 +24,7 @@ llng:
version: 2.18.2
# Docker image to use
image: '[[ .docker.repo ]]lemonldap-ng:[[ .llng.engine.version ]]-2'
image: '[[ .docker.repo ]]lemonldap-ng:[[ .llng.engine.version ]]-3'
# Resource allocation
resources: