Solved bugs for not to internet exposed ldap

This commit is contained in:
Kevin Veen-Birkenbach 2025-02-06 17:15:33 +01:00
parent f5c9c3edba
commit 31ee369a90
4 changed files with 10 additions and 2 deletions

View File

@ -19,6 +19,11 @@
state: absent
when: not applications.ldap.openldap.expose_to_internet | bool
- name: create docker network for LDAP, so that other applications can access it
docker_network:
name: central_ldap
state: present
- name: "create {{docker_compose.files.docker_compose}}"
template:
src: "docker-compose.yml.j2"

View File

@ -25,9 +25,11 @@ services:
image: bitnami/openldap:{{applications.ldap.openldap.version}}
container_name: openldap
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
{% if applications.ldap.openldap.expose_to_internet | bool %}
ports:
- 127.0.0.1:{{ldap_localhost_port}}:{{ldap_localhost_port}} # Expose just on localhost so that nginx stream proxy can use it
- 127.0.0.1:{{ldap_secure_localhost_port}}:{{ldap_secure_localhost_port}} # Expose just on localhost
{% endif %}
volumes:
- 'data:/bitnami/openldap'
healthcheck:

View File

@ -4,8 +4,9 @@ networks:
central_{{ database_type }}:
external: true
{% endif %}
{% if ldap_network_enabled %}
{% if ldap_network_enabled | bool %}
central_ldap:
external: true
{% endif %}
default:
{% if application_id in networks.local and networks.local[application_id].subnet is defined %}

View File

@ -3,7 +3,7 @@
{% if enable_central_database | bool and database_type is defined %}
central_{{ database_type }}:
{% endif %}
{% if ldap_network_enabled %}
{% if ldap_network_enabled | bool %}
central_ldap:
{% endif %}
default: