IMAGE_DEPS := $(IMAGE_DEPS) \
app/lldap/postgres_db \
app/lldap/postgres_user \
app/lldap/postgres_password \
app/lldap/admin_password \
app/lldap/jwt_secret \
app/lldap/lldap-config/lldap_config.toml

app/lldap/postgres_db: $(apps_config)
	bash -c 'source ./$(apps_config); printf "%s\n" "$$LLDAP_POSTGRES_DB" > $@'
app/lldap/postgres_user: $(apps_config)
	bash -c 'source ./$(apps_config); printf "%s\n" "$$LLDAP_POSTGRES_USER" > $@'
app/lldap/postgres_password: $(apps_config)
	bash -c 'source ./$(apps_config); printf "%s\n" "$$LLDAP_POSTGRES_PASSWORD" > $@'
app/lldap/admin_password: $(apps_config)
	bash -c 'source ./$(apps_config); printf "%s\n" "$$LLDAP_ADMIN_PASSWORD" > $@'
app/lldap/jwt_secret: $(apps_config)
	bash -c 'source ./$(apps_config); printf "%s\n" "$$LLDAP_JWT_SECRET" > $@'
app/lldap/lldap-config/lldap_config.toml: $(apps_config) app/lldap/lldap-config/lldap_config.toml.tmpl \
app/lldap/make-lldap-config.sh
	./app/lldap/make-lldap-config.sh $(apps_config)
