Add: docker-collections from mrjk
This commit is contained in:
parent
cc0a2fb2a8
commit
fb9ebb5380
11
ldap-user-manager/.env
Normal file
11
ldap-user-manager/.env
Normal file
@ -0,0 +1,11 @@
|
||||
APP_IMAGE=traefik
|
||||
APP_VERSION=v2.6.1
|
||||
|
||||
APP_PUBLIC_IP="127.0.0.1"
|
||||
APP_NETWORK=''
|
||||
|
||||
APP_DOMAIN=dev
|
||||
APP_ADMIN_EMAIL=admin@dev
|
||||
|
||||
TRAEFIK_CERTRESOLV=default
|
||||
TRAEFIK_CERTRESOLV_PROVIDER=''
|
||||
10
ldap-user-manager/README.md
Normal file
10
ldap-user-manager/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
# OpenLDAP Server
|
||||
|
||||
|
||||
## Self-serve configuration
|
||||
|
||||
## LUM configuration
|
||||
|
||||
For lUM, an initial config step is required:
|
||||
|
||||
https://lum.dev.box/setup/
|
||||
9
ldap-user-manager/docker-compose.debug.yml
Normal file
9
ldap-user-manager/docker-compose.debug.yml
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
services:
|
||||
manager:
|
||||
environment:
|
||||
- LDAP_DEBUG=true
|
||||
- LDAP_VERBOSE_CONNECTION_LOGS=true
|
||||
- SESSION_DEBUG=true
|
||||
- SMTP_LOG_LEVEL=4
|
||||
17
ldap-user-manager/docker-compose.traefik.yml
Normal file
17
ldap-user-manager/docker-compose.traefik.yml
Normal file
@ -0,0 +1,17 @@
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
name: ${APP_PROXY_NETWORK}
|
||||
|
||||
services:
|
||||
|
||||
manager:
|
||||
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.lum.entrypoints: front-http,front-https
|
||||
traefik.http.routers.lum.rule: Host(`lum.$APP_TOP_DOMAIN`)
|
||||
traefik.http.routers.lum.service: lum
|
||||
traefik.http.routers.lum.tls: "true"
|
||||
traefik.http.routers.lum.tls.certresolver: $TRAEFIK_CERTRESOLV
|
||||
traefik.http.services.lum.loadbalancer.server.port: '80'
|
||||
@ -1,18 +1,18 @@
|
||||
|
||||
version: "3.9"
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
name: ${APP_PROXY_NETWORK}
|
||||
ldap:
|
||||
external: true
|
||||
name: ${APP_LDAP_NETWORK}
|
||||
|
||||
services:
|
||||
|
||||
manager:
|
||||
image: wheelybird/ldap-user-manager:latest
|
||||
restart: always
|
||||
#restart: always
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
default:
|
||||
ldap:
|
||||
|
||||
environment:
|
||||
- "SERVER_HOSTNAME=lum.$APP_TOP_DOMAIN"
|
||||
@ -29,12 +29,3 @@ services:
|
||||
# MrJK Tweaking
|
||||
- "USERNAME_REGEX=^[a-z][a-zA-Z0-9._-]{2,32}$$"
|
||||
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.lum.entrypoints: front-http,front-https
|
||||
traefik.http.routers.lum.rule: Host(`lum.$APP_TOP_DOMAIN`)
|
||||
traefik.http.routers.lum.service: lum
|
||||
traefik.http.routers.lum.tls: "true"
|
||||
traefik.http.routers.lum.tls.certresolver: $TRAEFIK_CERTRESOLV
|
||||
traefik.http.services.lum.loadbalancer.server.port: '80'
|
||||
|
||||
60
traefik/init.sh
Executable file
60
traefik/init.sh
Executable file
@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_mkcert ()
|
||||
{
|
||||
local url=https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64
|
||||
local file=${url##*/}
|
||||
|
||||
if [[ -f mkcert ]]; then
|
||||
MKCERT=$PWD/mkcert
|
||||
return
|
||||
fi
|
||||
if command -v mkcert >&/dev/null; then
|
||||
MKCERT=$(command -v mkcert)
|
||||
return
|
||||
fi
|
||||
|
||||
# Install mkcert in PWD
|
||||
wget "$url"
|
||||
mv "$file" mkcert
|
||||
chmod +x mkcert
|
||||
}
|
||||
|
||||
gen_certs ()
|
||||
{
|
||||
install_mkcert
|
||||
DOMAIN1="domain1.org"
|
||||
DOMAIN2="domain2.org"
|
||||
SUBDOMAINS=$( echo {infra,paas,apps,iaas,dev,cloud,lab,adm,sv,mgmt}.$DOMAIN1 {infra,paas,apps,iaas,dev,cloud,lab,adm,sv,mgmt}.$DOMAIN2 )
|
||||
DOMAIN=$DOMAIN1
|
||||
|
||||
echo $MKCERT "$DOMAIN" "*.$DOMAIN" $SUBDOMAINS
|
||||
(
|
||||
cd config/
|
||||
$MKCERT "$DOMAIN" "*.$DOMAIN" $SUBDOMAINS
|
||||
)
|
||||
echo "INFO: Certificates has bee generated."
|
||||
tree config
|
||||
|
||||
}
|
||||
|
||||
gen_htpassword ()
|
||||
{
|
||||
CONFIG="admin:admin"
|
||||
local dst="./config/htpasswd"
|
||||
set -x
|
||||
|
||||
while IFS=: read -r user pass; do
|
||||
! grep -sq "^$user:" $dst >&/dev/null || continue
|
||||
echo "Add: $user to $dst"
|
||||
printf "$user:$(openssl passwd -apr1 $pass)\n" >> "$dst"
|
||||
done <<< "$CONFIG"
|
||||
}
|
||||
|
||||
main ()
|
||||
{
|
||||
gen_certs
|
||||
gen_htpassword
|
||||
}
|
||||
|
||||
main
|
||||
Loading…
x
Reference in New Issue
Block a user