docs(examples): add authentik ldap example

This commit is contained in:
fiftin 2024-05-31 23:11:13 +02:00
parent 3a05705ef5
commit cb14c045c5
No known key found for this signature in database
GPG Key ID: 044381366A5D4731
3 changed files with 80 additions and 3 deletions

2
examples/authentik/.env Normal file
View File

@ -0,0 +1,2 @@
PG_PASS=mgXHPydZHMpir8h3bUWxxkV1LyBQfizpP1zW3CXN8iewkgNC
AUTHENTIK_SECRET_KEY=dNHpMtjAgw2D1NXiyeKgJ/olDuUQ5ieWZVBDr/6CVK0wDyK/8r9vj8Lv9DfworfJlA8iVk3u/DXQE+1Z

View File

@ -0,0 +1,75 @@
version: '3.8'
services:
postgresql:
image: docker.io/library/postgres:16-alpine
volumes:
- database:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${PG_PASS:?database password required}
POSTGRES_USER: authentik
POSTGRES_DB: authentik
env_file:
- .env
redis:
image: docker.io/library/redis:alpine
volumes:
- redis:/data
server:
image: ghcr.io/goauthentik/server:2024.4.2
command: server
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
AUTHENTIK_LISTEN__LDAP: "0.0.0.0:3389"
volumes:
- ./media:/media
- ./custom-templates:/templates
env_file:
- .env
ports:
- "9000:9000"
- "9443:9443"
depends_on:
- postgresql
- redis
ldap:
image: ghcr.io/goauthentik/ldap
ports:
- "389:3389"
- "636:6636"
environment:
AUTHENTIK_HOST: http://server:9000
AUTHENTIK_INSECURE: "false"
AUTHENTIK_TOKEN: Yi9VLtmTyhWLdolpEBsFVPOPlIHoNqWYVb4OnC03xMzitlWEAHX2XJOPtO6N
worker:
image: ghcr.io/goauthentik/server:2024.4.2
command: worker
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./media:/media
- ./certs:/certs
- ./custom-templates:/templates
env_file:
- .env
depends_on:
- postgresql
- redis
volumes:
database:
redis:

View File

@ -3,7 +3,7 @@ version: '3.8'
services: services:
ldap: ldap:
image: osixia/openldap:1.5.0 image: osixia/openldap:1.5.0
container_name: openldap # container_name: openldap
environment: environment:
LDAP_ORGANISATION: "Example Inc." LDAP_ORGANISATION: "Example Inc."
LDAP_DOMAIN: "example.org" LDAP_DOMAIN: "example.org"
@ -17,7 +17,7 @@ services:
ldap_admin: ldap_admin:
image: osixia/phpldapadmin:0.9.0 image: osixia/phpldapadmin:0.9.0
container_name: phpldapadmin # container_name: phpldapadmin
environment: environment:
PHPLDAPADMIN_LDAP_HOSTS: ldap PHPLDAPADMIN_LDAP_HOSTS: ldap
ports: ports:
@ -27,7 +27,7 @@ services:
semaphore: semaphore:
image: semaphoreui/semaphore:latest image: semaphoreui/semaphore:latest
container_name: semaphore # container_name: semaphore
environment: environment:
SEMAPHORE_DB_DIALECT: "bolt" SEMAPHORE_DB_DIALECT: "bolt"
SEMAPHORE_ADMIN_PASSWORD: "semaphore_admin" SEMAPHORE_ADMIN_PASSWORD: "semaphore_admin"