Compare commits
2 Commits
cc0a2fb2a8
...
3a4a54bf31
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a4a54bf31 | |||
| 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=''
|
||||
14
ldap-user-manager/README.md
Normal file
14
ldap-user-manager/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# OpenLDAP Server
|
||||
|
||||
|
||||
## Self-serve configuration
|
||||
|
||||
## LUM configuration
|
||||
|
||||
For lUM, an initial config step is required:
|
||||
|
||||
https://lum.dev.box/setup/
|
||||
|
||||
https://lum.dev.box/setup/run_checks.php
|
||||
|
||||
|
||||
17
ldap-user-manager/TMP_DISABLED_docker-compose.traefik.yml
Normal file
17
ldap-user-manager/TMP_DISABLED_docker-compose.traefik.yml
Normal file
@ -0,0 +1,17 @@
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
name: ${APP_PROXY_NETWORK}
|
||||
|
||||
services:
|
||||
|
||||
lum:
|
||||
|
||||
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'
|
||||
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:
|
||||
lum:
|
||||
environment:
|
||||
- LDAP_DEBUG=true
|
||||
- LDAP_VERBOSE_CONNECTION_LOGS=true
|
||||
- SESSION_DEBUG=true
|
||||
- SMTP_LOG_LEVEL=4
|
||||
@ -1,18 +1,18 @@
|
||||
|
||||
version: "3.7"
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
name: ${APP_PROXY_NETWORK}
|
||||
ldap:
|
||||
external: true
|
||||
name: ${APP_LDAP_NETWORK}
|
||||
|
||||
services:
|
||||
|
||||
manager:
|
||||
lum:
|
||||
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'
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
networks:
|
||||
front:
|
||||
external: true
|
||||
name: ${APP_PROXY_NETWORK}
|
||||
name: ${APP_PROXY_NETWORK:-traefik}
|
||||
|
||||
services:
|
||||
minio:
|
||||
|
||||
@ -2,7 +2,7 @@ version: "3.9"
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${APP_MINIO_NETWORK}
|
||||
name: ${APP_S3_NETWORK:-s3}
|
||||
|
||||
|
||||
services:
|
||||
@ -19,3 +19,4 @@ services:
|
||||
- MINIO_DOMAIN=minio.$APP_TOP_DOMAIN
|
||||
- MINIO_SERVER_URL=https://minio.$APP_TOP_DOMAIN
|
||||
- MINIO_BROWSER_REDIRECT_URL=https://minio-console.$APP_TOP_DOMAIN
|
||||
|
||||
|
||||
@ -8,3 +8,9 @@
|
||||
For lUM, an initial config step is required:
|
||||
|
||||
https://lum.dev.box/setup/
|
||||
|
||||
If you want to connect with JXplorer:
|
||||
IP: your epxosed IP ....
|
||||
BASE_DN: dc=my,dc=domain
|
||||
User DN: cn=admin,dc=dev,dc=box
|
||||
User password: LDAPADMINPASS
|
||||
|
||||
@ -4,8 +4,8 @@ services:
|
||||
traefik:
|
||||
ports:
|
||||
- "$APP_PUBLIC_IP:443:443"
|
||||
labels:
|
||||
- "traefik.http.routers.dashboard.tls=true"
|
||||
#labels:
|
||||
# - "traefik.http.routers.dashboard.tls=true"
|
||||
environment:
|
||||
|
||||
# Entrypoints
|
||||
@ -1,16 +1,16 @@
|
||||
---
|
||||
version: "3.7"
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${APP_NETWORK}
|
||||
#networks:
|
||||
# default:
|
||||
# name: ${APP_NETWORK}
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: ${APP_IMAGE:-traefik}:${APP_VERSION:-v2.6.1}
|
||||
restart: always
|
||||
networks:
|
||||
default:
|
||||
#networks:
|
||||
# default:
|
||||
environment:
|
||||
|
||||
#command:
|
||||
@ -46,14 +46,14 @@ services:
|
||||
- ./logs:/logs
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
labels:
|
||||
#### Labels define the behavior and rules of the traefik proxy for this container ####
|
||||
- "traefik.enable=true" # <== Enable traefik on itself to view dashboard and assign subdomain to view it
|
||||
- "traefik.http.routers.dashboard.rule=Host(`${APP_DOMAIN}`)" # <== Setting the domain for the dashboard
|
||||
#- "traefik.http.routers.dashboard.service=api@internal" # <== Enabling the api to be a service to access
|
||||
- "traefik.http.routers.dashboard.service=dashboard" # <== Enabling the api to be a service to access
|
||||
- "traefik.http.routers.dashboard.entrypoints=$TRAEFIK_ENTRYPOINTS"
|
||||
#- "traefik.http.routers.dashboard.tls=true"
|
||||
- "traefik.http.routers.dashboard.tls.certresolver=$TRAEFIK_CERTRESOLV"
|
||||
- "traefik.http.services.dashboard.loadbalancer.server.port=8080"
|
||||
# labels:
|
||||
# #### Labels define the behavior and rules of the traefik proxy for this container ####
|
||||
# - "traefik.enable=true" # <== Enable traefik on itself to view dashboard and assign subdomain to view it
|
||||
# - "traefik.http.routers.dashboard.rule=Host(`${APP_DOMAIN}`)" # <== Setting the domain for the dashboard
|
||||
# #- "traefik.http.routers.dashboard.service=api@internal" # <== Enabling the api to be a service to access
|
||||
# - "traefik.http.routers.dashboard.service=dashboard" # <== Enabling the api to be a service to access
|
||||
# - "traefik.http.routers.dashboard.entrypoints=$TRAEFIK_ENTRYPOINTS"
|
||||
# #- "traefik.http.routers.dashboard.tls=true"
|
||||
# - "traefik.http.routers.dashboard.tls.certresolver=$TRAEFIK_CERTRESOLV"
|
||||
# - "traefik.http.services.dashboard.loadbalancer.server.port=8080"
|
||||
|
||||
|
||||
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