Compare commits

...

2 Commits

Author SHA1 Message Date
3a4a54bf31 Update: Work In Progress of modules 2022-07-28 04:24:17 -04:00
fb9ebb5380 Add: docker-collections from mrjk 2022-07-19 01:06:13 -04:00
14 changed files with 144 additions and 35 deletions

11
ldap-user-manager/.env Normal file
View 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=''

View 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

View 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'

View File

@ -0,0 +1,9 @@
services:
lum:
environment:
- LDAP_DEBUG=true
- LDAP_VERBOSE_CONNECTION_LOGS=true
- SESSION_DEBUG=true
- SMTP_LOG_LEVEL=4

View File

@ -1,18 +1,18 @@
version: "3.7"
networks: networks:
proxy: ldap:
name: ${APP_PROXY_NETWORK} external: true
name: ${APP_LDAP_NETWORK}
services: services:
manager: lum:
image: wheelybird/ldap-user-manager:latest image: wheelybird/ldap-user-manager:latest
restart: always #restart: always
networks: networks:
proxy: ldap:
default:
environment: environment:
- "SERVER_HOSTNAME=lum.$APP_TOP_DOMAIN" - "SERVER_HOSTNAME=lum.$APP_TOP_DOMAIN"
@ -29,12 +29,3 @@ services:
# MrJK Tweaking # MrJK Tweaking
- "USERNAME_REGEX=^[a-z][a-zA-Z0-9._-]{2,32}$$" - "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'

View File

@ -2,7 +2,7 @@
networks: networks:
front: front:
external: true external: true
name: ${APP_PROXY_NETWORK} name: ${APP_PROXY_NETWORK:-traefik}
services: services:
minio: minio:

View File

@ -2,7 +2,7 @@ version: "3.9"
networks: networks:
default: default:
name: ${APP_MINIO_NETWORK} name: ${APP_S3_NETWORK:-s3}
services: services:
@ -19,3 +19,4 @@ services:
- MINIO_DOMAIN=minio.$APP_TOP_DOMAIN - MINIO_DOMAIN=minio.$APP_TOP_DOMAIN
- MINIO_SERVER_URL=https://minio.$APP_TOP_DOMAIN - MINIO_SERVER_URL=https://minio.$APP_TOP_DOMAIN
- MINIO_BROWSER_REDIRECT_URL=https://minio-console.$APP_TOP_DOMAIN - MINIO_BROWSER_REDIRECT_URL=https://minio-console.$APP_TOP_DOMAIN

View File

@ -8,3 +8,9 @@
For lUM, an initial config step is required: For lUM, an initial config step is required:
https://lum.dev.box/setup/ 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

View File

@ -4,8 +4,8 @@ services:
traefik: traefik:
ports: ports:
- "$APP_PUBLIC_IP:443:443" - "$APP_PUBLIC_IP:443:443"
labels: #labels:
- "traefik.http.routers.dashboard.tls=true" # - "traefik.http.routers.dashboard.tls=true"
environment: environment:
# Entrypoints # Entrypoints

View File

@ -1,16 +1,16 @@
--- ---
version: "3.7" version: "3.7"
networks: #networks:
default: # default:
name: ${APP_NETWORK} # name: ${APP_NETWORK}
services: services:
traefik: traefik:
image: ${APP_IMAGE:-traefik}:${APP_VERSION:-v2.6.1} image: ${APP_IMAGE:-traefik}:${APP_VERSION:-v2.6.1}
restart: always restart: always
networks: #networks:
default: # default:
environment: environment:
#command: #command:
@ -46,14 +46,14 @@ services:
- ./logs:/logs - ./logs:/logs
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
labels: # labels:
#### Labels define the behavior and rules of the traefik proxy for this container #### # #### 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.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.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=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.service=dashboard" # <== Enabling the api to be a service to access
- "traefik.http.routers.dashboard.entrypoints=$TRAEFIK_ENTRYPOINTS" # - "traefik.http.routers.dashboard.entrypoints=$TRAEFIK_ENTRYPOINTS"
#- "traefik.http.routers.dashboard.tls=true" # #- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.tls.certresolver=$TRAEFIK_CERTRESOLV" # - "traefik.http.routers.dashboard.tls.certresolver=$TRAEFIK_CERTRESOLV"
- "traefik.http.services.dashboard.loadbalancer.server.port=8080" # - "traefik.http.services.dashboard.loadbalancer.server.port=8080"

60
traefik/init.sh Executable file
View 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