Update caretakerd, add wait_for task

This commit is contained in:
Daniel Berteaud 2024-01-05 14:35:13 +01:00
parent 0f5c3939f4
commit 8cdb8a6b7a
4 changed files with 14 additions and 4 deletions

View File

@ -2,7 +2,7 @@ FROM [[ .docker.repo ]][[ .docker.base_images.alma9.image ]]
MAINTAINER [[ .docker.maintainer ]] MAINTAINER [[ .docker.maintainer ]]
ARG LLNG_VERSION=2.18.1 \ ARG LLNG_VERSION=2.18.1 \
CARETAKERD_VERSION=1.0.7 CARETAKERD_VERSION=1.0.8
ENV PATH=/usr/libexec/lemonldap-ng/bin:${PATH} \ ENV PATH=/usr/libexec/lemonldap-ng/bin:${PATH} \
LLNG_LISTEN=unix:/tmp/llng.sock \ LLNG_LISTEN=unix:/tmp/llng.sock \

View File

@ -52,6 +52,8 @@ job "[[ .instance ]]" {
] ]
} }
[[ template "common/task.wait_for" $c ]]
task "lemonldap-ng" { task "lemonldap-ng" {
driver = [[ $c.nomad.driver | toJSON ]] driver = [[ $c.nomad.driver | toJSON ]]
@ -67,7 +69,9 @@ job "[[ .instance ]]" {
} }
vault { vault {
policies = ["[[ .instance ]][[ .consul.suffix ]]"] policies = ["[[ .instance ]][[ .consul.suffix ]]"]
env = false
disable_file = true
} }
[[ template "common/artifacts" $c ]] [[ template "common/artifacts" $c ]]

View File

@ -1,5 +1,5 @@
[all] [all]
logLevel = notice logLevel = [[ .llng.engine.log_level ]]
localSessionStorage = Cache::FileCache localSessionStorage = Cache::FileCache
localSessionStorageOptions = { \ localSessionStorageOptions = { \
'namespace' => 'sessions', \ 'namespace' => 'sessions', \

View File

@ -12,7 +12,7 @@ llng:
count: 1 count: 1
# Docker image to use # Docker image to use
image: '[[ .docker.repo ]]lemonldap-ng:2.18.1-4' image: '[[ .docker.repo ]]lemonldap-ng:2.18.1-5'
# Resource allocation # Resource allocation
resources: resources:
@ -26,6 +26,9 @@ llng:
- destination_name: postgres[[ .consul.suffix ]] - destination_name: postgres[[ .consul.suffix ]]
local_bind_port: 5432 local_bind_port: 5432
wait_for:
- service: postgres[[ .consul.suffix ]]
# Additional env vars to pass to the container # Additional env vars to pass to the container
env: env:
# Database settings # Database settings
@ -46,6 +49,9 @@ llng:
source: git::https://git.lapiole.org/nomad/lemonldap-ng.git//files/assets source: git::https://git.lapiole.org/nomad/lemonldap-ng.git//files/assets
destination: local/assets/static/common destination: local/assets/static/common
# Log level of the engine
log_level: notice
# Settings for the portal itself # Settings for the portal itself
portal: portal:
# URL used by users to reach the portal # URL used by users to reach the portal