39 Commits

Author SHA1 Message Date
fab e865a59757 upgrdae MM en 11.7.7 2026-07-20 07:27:54 +02:00
fab abb146483f correction createUser.sh 2026-07-06 03:32:04 +02:00
fab d363411dae correction createuser 2026-07-06 02:54:59 +02:00
fab 9ebf787775 correction createUser 2026-07-06 02:51:58 +02:00
fab 3312071f2d correction createUser 2026-07-06 02:40:28 +02:00
fab a73c2db27d correction createUser 2026-07-06 02:23:05 +02:00
fab ffd284e2c8 correction grmllll 2026-07-05 21:56:12 +02:00
fab f0b650e9ed vire les heredoc 2026-07-05 19:49:14 +02:00
fab c8e7cebfd6 correction webhook 2026-07-05 19:38:36 +02:00
fab cb24266167 remplacer les appels mmctl soit par l'api REST soit par un webhook entrant 2026-07-05 19:08:06 +02:00
fab c5bced89d8 ajout de la sauvegarde PG de pollaris 2026-07-02 08:29:25 +02:00
fab 6e72fef23e test commit 2026-06-25 10:48:25 +02:00
Didier a2ca914b62 correction d'une coquille dans le mail de fin 2026-06-20 11:36:24 +02:00
fab f3fa9a33e5 construire le mail à envoyer aux orgas lors de la création des services 2026-06-20 10:57:24 +02:00
fanch 6dd19e07a3 Merge branch 'master' of ssh://git.kaz.bzh:2202/KAZ/KazV2 2026-06-20 09:15:57 +02:00
fab c7c8d5be3c upgrade traefik en 3.7.5 2026-06-20 07:52:52 +02:00
fab d99bf81014 bug sur double volume: 2026-06-20 07:52:52 +02:00
fab 71ae93752a pouvoir créer le service webdav (sur un volume wp) 2026-06-20 07:52:52 +02:00
fab 95d468913d pas de bind avec admin mais avec l'utilisateur 2026-06-20 07:52:52 +02:00
fanch b1817e2c16 les users peuvent se trouver dans le ldap 2026-06-20 07:52:52 +02:00
fanch 573c087b4d ajout ldapconfvi 2026-06-20 07:52:52 +02:00
fab 0dbe6115ca permettre du webdav pour les orga 2026-06-20 07:52:52 +02:00
fab eafa62ffb9 oops, rajoute https avec l'url 2026-06-20 07:52:52 +02:00
fanch 33f49eb78a plus de smtp par défaut pour les orgas 2026-06-20 07:52:52 +02:00
fanch 421276dc83 paheko passe maintenant par smtp principal 2026-06-20 07:52:52 +02:00
fab f219b2d339 ajoute usage si 0 param fourni 2026-06-20 07:52:52 +02:00
nom 1d822f66c9 autoriser les url courtes pour les orga 2026-06-20 07:52:52 +02:00
nom ff07c8aee7 créé une entrée supplémentaire dans le DNS avec le nom court de l'orga 2026-06-20 07:52:52 +02:00
nom 598e215ed1 upgrade traefik en 3.7.1 2026-06-20 07:52:52 +02:00
nom ea9febcde0 test downgrade traefik 2026-06-20 07:52:52 +02:00
nom 51d57223c9 upgrade traefik 3.7.1 2026-06-20 07:52:52 +02:00
nom bb4fefcdda paheko upgrade plugin facturation 2026-06-20 07:52:52 +02:00
nom 47f708045e upgrade paheko 1.3.20 2026-06-20 07:52:52 +02:00
nom fdd94bc9a1 bug sur double volume: 2026-06-16 21:36:44 +02:00
nom 366c019c0e pouvoir créer le service webdav (sur un volume wp) 2026-06-16 19:54:34 +02:00
nom d9f642ecf7 pas de bind avec admin mais avec l'utilisateur 2026-06-16 19:00:29 +02:00
fanch ea58b63659 les users peuvent se trouver dans le ldap 2026-06-16 18:00:31 +02:00
fanch f1f99aafeb ajout ldapconfvi 2026-06-16 18:00:03 +02:00
fab 7e0de9ee8b upgrade MM 11.6.1 2026-05-02 10:18:02 +02:00
15 changed files with 300 additions and 43 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
# kaz
[Kaz](https://kaz.bzh/) est un CHATONS du Morbihan. Nous proposons ici un moyen de le répliquer dans d'autres lieux. Il y a des éléments de configuration à définir avant d'initialiser ce simulateur.
[Kaz](https://kaz.bzh/) est un CHATONS du Morbihan. Nous proposons ici un moyen de le répliquer dans d'autres lieux. Il y a des éléments de configuration à définir avant d'initialiser ce
simulateur..
Il est possible de simuler notre CHATONS dans une VirtualBox pour mettre au point nos différents services (voir [kaz-vagrant](https://git.kaz.bzh/KAZ/kaz-vagrant)).
+9 -4
View File
@@ -4,14 +4,14 @@
#Kan: 2021
#Koi: gestion dockers
#02/07/2026: fab: ajout de la sauvegarde pour pollaris
# 20/04/2025: Did : Ajout des sauvegardes de peertube dans les services generaux
# 15/01/2025: Dernière modif by fab: ne pas redémarrer Traefik en cas de créaio d'orga
# Did : 13 fevrier 2025 modif des save en postgres et mysql
# Did : ajout des sauvegardes de mobilizon et mattermost en postgres
# 20/04/2025
# Did : Ajout des sauvegardes de peertube dans les services generaux
# En cas d'absence de postfix, il faut lancer :
# docker network create postfix_mailNet
@@ -229,6 +229,11 @@ saveComposes () {
. $KAZ_KEY_DIR/env-mastodonDB
saveDB ${mastodonDBName} "${POSTGRES_USER}" "${POSTGRES_PASSWORD}" "${POSTGRES_DB}" mastodon postgres
;;
pollaris)
echo "save pollaris (new kazdate)"
. $KAZ_KEY_DIR/env-pollarisDB
saveDB ${pollarisDBName} "${POSTGRES_USER}" "${POSTGRES_PASSWORD}" "${POSTGRES_DB}" pollaris postgres
;;
roundcube)
echo "save roundcube"
. $KAZ_KEY_DIR/env-roundcubeDB
+120 -20
View File
@@ -5,6 +5,8 @@
# ki : fab
# test git du 02/10/2023 depuis snster
#maj by fab du 05/07/2026: remplacer les appels mmctl soit par l'api REST soit par un webhook entrant
# !!! need by htpasswd
# apt-get install apache2-utils dos2unix
@@ -42,6 +44,7 @@ cd "${KAZ_ROOT}"
. $KAZ_KEY_DIR/env-ldapServ
. $KAZ_KEY_DIR/env-sympaServ
. $KAZ_KEY_DIR/env-paheko
. $KAZ_KEY_DIR/env-mattermostAdmin
# DOCK_DIR="${KAZ_COMP_DIR}" # ???
@@ -218,15 +221,36 @@ FILE_LDIF=/home/sauve/ldap.ldif
gunzip ${FILE_LDIF}.gz -f
grep -aEiorh '([[:alnum:]]+([._-][[:alnum:]]+)*@[[:alnum:]]+([._-][[:alnum:]]+)*\.[[:alpha:]]{2,6})' ${FILE_LDIF} | sort -u > ${TFILE_EMAIL}
echo "récupération des login mattermost... "
docker exec -i mattermostServ bin/mmctl user list --all | grep ":.*(" | cut -d ':' -f 2 | cut -d ' ' -f 2 | sort > "${TFILE_MM}"
# remplacé par la l'API REST
# echo "récupération des login mattermost... "
# docker exec -i mattermostServ bin/mmctl user list --all | grep ":.*(" | cut -d ':' -f 2 | cut -d ' ' -f 2 | sort > "${TFILE_MM}"
> "${TFILE_MM}"
page=0
while true; do
json=$(curl -s \
-H "Authorization: Bearer ${mattermost_token}" \
"https://${URL_AGORA}/api/v4/users?page=${page}&per_page=200")
nb=$(echo "${json}" | jq 'length')
if [ "${nb}" -eq 0 ]; then
break
fi
echo "${json}" | jq -r '.[].username' >> "${TFILE_MM}"
page=$((page + 1))
done
sort -o "${TFILE_MM}" "${TFILE_MM}"
dos2unix "${TFILE_MM}"
echo "done"
# remplacé par la l'API REST
# se connecter à l'agora pour ensuite pouvoir passer toutes les commandes mmctl
. $KAZ_KEY_DIR/env-mattermostAdmin
echo "docker exec -i mattermostServ bin/mmctl auth login ${httpProto}://${URL_AGORA} --name local-server --username ${mattermost_user} --password ${mattermost_pass}" | tee -a "${CMD_INIT}"
# . $KAZ_KEY_DIR/env-mattermostAdmin
# echo "docker exec -i mattermostServ bin/mmctl auth login ${httpProto}://${URL_AGORA} --name local-server --username ${mattermost_user} --password ${mattermost_pass}" | tee -a "${CMD_INIT}"
# vérif des emails
regex="^(([A-Za-z0-9]+((\.|\-|\_|\+)?[A-Za-z0-9]?)*[A-Za-z0-9]+)|[A-Za-z0-9]+)@(([A-Za-z0-9]+)+((\.|\-|\_)?([A-Za-z0-9]+)+)*)+\.([A-Za-z]{2,})+$"
@@ -591,25 +615,90 @@ userPassword: {CRYPT}${pass}\n\n' | ldapmodify -c -H ldap://${LDAP_IP} -D \"cn=$
fi
if grep -q "^${IDENT_KAZ}$" "${TFILE_MM}" 2>/dev/null; then
echo "${IDENT_KAZ} existe déjà sur mattermost" | tee -a "${LOG}"
echo "${IDENT_KAZ} existe déjà sur mattermost" | tee -a "${LOG}"
else
# on créé le compte mattermost
echo "docker exec -i mattermostServ bin/mmctl user create --email ${EMAIL_SOUHAITE} --username ${IDENT_KAZ} --password ${PASSWORD}" | tee -a "${CMD_LOGIN}"
# et enfin on ajoute toujours le user à l'équipe KAZ et aux 2 channels publiques
echo "docker exec -i mattermostServ bin/mmctl team users add kaz ${EMAIL_SOUHAITE}" | tee -a "${CMD_LOGIN}"
echo "docker exec -i mattermostServ bin/mmctl channel users add kaz:une-question--un-soucis ${EMAIL_SOUHAITE}" | tee -a "${CMD_LOGIN}"
echo "docker exec -i mattermostServ bin/mmctl channel users add kaz:cafe-du-commerce--ouvert-2424h ${EMAIL_SOUHAITE}" | tee -a "${CMD_LOGIN}"
# on créé le compte mattermost
#echo "docker exec -i mattermostServ bin/mmctl user create --email ${EMAIL_SOUHAITE} --username ${IDENT_KAZ} --password ${PASSWORD}" | tee -a "${CMD_LOGIN}"
#on remplace par l'api rest
#KAZ a quelle team id ?
KAZ_ID=$(curl -s -H "Authorization: Bearer ${mattermost_token}" "https://${URL_AGORA}/api/v4/teams/name/kaz" | jq -r '.id')
CHAN1_ID=$(curl -s -H "Authorization: Bearer ${mattermost_token}" "https://${URL_AGORA}/api/v4/teams/name/kaz/channels/name/une-question--un-soucis" | jq -r '.id')
CHAN2_ID=$(curl -s -H "Authorization: Bearer ${mattermost_token}" "https://${URL_AGORA}/api/v4/teams/name/kaz/channels/name/cafe-du-commerce--ouvert-2424h" | jq -r '.id')
cat >> "${CMD_LOGIN}" <<EOF
resp=\$(curl -s -X POST "https://${URL_AGORA}/api/v4/users" \
-H "Authorization: Bearer ${mattermost_token}" \
-H "Content-Type: application/json" \
-d '{"email":"${EMAIL_SOUHAITE}","username":"${IDENT_KAZ}","password":"${PASSWORD}"}')
USER_ID=\$(echo "\$resp" | jq -r '.id')
# et enfin on ajoute toujours le user à l'équipe KAZ et aux 2 channels publiques
curl -s -X POST "https://${URL_AGORA}/api/v4/teams/${KAZ_ID}/members" \
-H "Authorization: Bearer ${mattermost_token}" \
-H "Content-Type: application/json" \
-d '{ "team_id": "${KAZ_ID}", "user_id": "'"\${USER_ID}"'"}'
curl -s -X POST "https://${URL_AGORA}/api/v4/channels/${CHAN1_ID}/members" \
-H "Authorization: Bearer ${mattermost_token}" \
-H "Content-Type: application/json" \
-d '{ "user_id": "'"\${USER_ID}"'"}'
curl -s -X POST "https://${URL_AGORA}/api/v4/channels/${CHAN2_ID}/members" \
-H "Authorization: Bearer ${mattermost_token}" \
-H "Content-Type: application/json" \
-d '{ "user_id": "'"\${USER_ID}"'"}'
EOF
# echo "docker exec -i mattermostServ bin/mmctl channel users add kaz:une-question--un-soucis ${EMAIL_SOUHAITE}" | tee -a "${CMD_LOGIN}"
# echo "docker exec -i mattermostServ bin/mmctl channel users add kaz:cafe-du-commerce--ouvert-2424h ${EMAIL_SOUHAITE}" | tee -a "${CMD_LOGIN}"
NB_SERVICES_BASE=$((NB_SERVICES_BASE+1))
fi
if [ "${EQUIPE_AGORA}" != "" -a "${EQUIPE_AGORA}" != "kaz" ]; then
# l'équipe existe t-elle déjà ?
nb=$(docker exec mattermostServ bin/mmctl team list | grep -w "${EQUIPE_AGORA}" | wc -l)
if [ "${nb}" == "0" ];then # non, on la créé en mettant le user en admin de l'équipe
echo "docker exec -i mattermostServ bin/mmctl team create --name ${EQUIPE_AGORA} --display-name ${EQUIPE_AGORA} --email ${EMAIL_SOUHAITE}" --private | tee -a "${CMD_INIT}"
fi
# puis ajouter le user à l'équipe
echo "docker exec -i mattermostServ bin/mmctl team users add ${EQUIPE_AGORA} ${EMAIL_SOUHAITE}" | tee -a "${CMD_INIT}"
# l'équipe existe t-elle déjà ?
#nb=$(docker exec mattermostServ bin/mmctl team list | grep -w "${EQUIPE_AGORA}" | wc -l)
http_code=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${mattermost_token}" "https://${URL_AGORA}/api/v4/teams/name/${EQUIPE_AGORA}")
[ "$http_code" -eq 200 ] && nb=1 || nb=0
if [ "${nb}" == "0" ];then # non, on la créé en mettant le user en admin de l'équipe
#echo "docker exec -i mattermostServ bin/mmctl team create --name ${EQUIPE_AGORA} --display-name ${EQUIPE_AGORA} --email ${EMAIL_SOUHAITE}" --private | tee -a "${CMD_INIT}"
#################################
cat >> "${CMD_LOGIN}" <<EOF
resp=\$(curl -s -X POST "https://${URL_AGORA}/api/v4/teams" \
-H "Authorization: Bearer ${mattermost_token}" \
-H "Content-Type: application/json" \
-d '{ "name":"${EQUIPE_AGORA}", "display_name":"${EQUIPE_AGORA}", "type":"I"}')
TEAM_ID=\$(echo "\$resp" | jq -r '.id')
#puis ajouter le user à l'équipe
#echo "docker exec -i mattermostServ bin/mmctl team users add ${EQUIPE_AGORA} ${EMAIL_SOUHAITE}" | tee -a "${CMD_INIT}"
curl -s -X POST "https://${URL_AGORA}/api/v4/teams/\${TEAM_ID}/members" \
-H "Authorization: Bearer ${mattermost_token}" \
-H "Content-Type: application/json" \
-d '{ "team_id": "'"\${TEAM_ID}"'", "user_id": "'"\${USER_ID}"'" }'
#et on le rend admin de son équipe
curl -s -X PUT "https://${URL_AGORA}/api/v4/teams/\${TEAM_ID}/members/\${USER_ID}/roles" \
-H "Authorization: Bearer ${mattermost_token}" \
-H "Content-Type: application/json" \
-d '{"scheme_admin": true , "scheme_user": true }'
EOF
fi
fi
if [ -n "${CREATE_ORGA_SERVICES}" ]; then
@@ -757,8 +846,19 @@ bisou!"
EOF" | tee -a "${CMD_MSG}"
echo " # on envoie la confirmation d'inscription sur l'agora " | tee -a "${CMD_MSG}"
echo "docker exec -i mattermostServ bin/mmctl post create kaz:Creation-Comptes --message \"${MAIL_KAZ}\"" | tee -a "${CMD_MSG}"
#echo "docker exec -i mattermostServ bin/mmctl post create kaz:Creation-Comptes --message \"${MAIL_KAZ}\"" | tee -a "${CMD_MSG}"
#pas réussi à le mettre dans CMD_MSG :(, je balance direct)
payload=$(jq -n \
--arg channel "creation-comptes" \
--arg text "$MAIL_KAZ" \
'{channel: $channel, text: $text}')
curl -i -X POST \
-H "Content-Type: application/json" \
-d "$payload" \
"https://${URL_AGORA}/hooks/${token_webhook}"
# fin des inscriptions
done <<< "${ALL_LINES}"
+1 -1
View File
@@ -41,7 +41,7 @@ CONTAINERS_TYPES=
declare -A DockerServNames # le nom des containers correspondant
DockerServNames=( [cloud]="${nextcloudServName}" [agora]="${mattermostServName}" [wiki]="${dokuwikiServName}" [wp]="${wordpressServName}" [office]="${officeServName}" [paheko]="${pahekoServName}" [castopod]="${castopodServName}" [spip]="${spipServName}" )
DockerServNames=( [cloud]="${nextcloudServName}" [agora]="${mattermostServName}" [wiki]="${dokuwikiServName}" [wp]="${wordpressServName}" [office]="${officeServName}" [paheko]="${pahekoServName}" [castopod]="${castopodServName}" [spip]="${spipServName}" [webdav]="${webdavServName}" )
declare -A FilterLsVolume # Pour trouver quel volume appartient à quel container
FilterLsVolume=( [cloud]="cloudMain" [agora]="matterConfig" [wiki]="wikiConf" [wp]="wordpress" [castopod]="castopodMedia" [spip]="spip")
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
KAZ_ROOT=/kaz
. $KAZ_ROOT/bin/.commonFunctions.sh
setKazVars
. $DOCKERS_ENV
. $KAZ_KEY_DIR/env-ldapServ
LDAP_IP=$(docker inspect -f '{{.NetworkSettings.Networks.ldapNet.IPAddress}}' ldapServ)
read -p "quel éditeur ? [vi] " EDITOR
EDITOR=${EDITOR:-vi}
# if [ ${EDITOR} = 'emacs' ]; then
# echo "ALERTE ALERTE !!! quelqu'un a voulu utiliser emacs :) :) :)"
# exit
# fi
EDITOR=${EDITOR:-vi}
export EDITOR=${EDITOR}
ldapvi -h $LDAP_IP -D "cn=${LDAP_CONFIG_ADMIN_USERNAME},cn=config" -w ${LDAP_CONFIG_ADMIN_PASSWORD} -b cn=config
+1 -1
View File
@@ -41,7 +41,7 @@ CONTAINERS_TYPES=
declare -A DockerServNames # le nom des containers correspondant
DockerServNames=( [cloud]="${nextcloudServName}" [agora]="${mattermostServName}" [wiki]="${dokuwikiServName}" [wp]="${wordpressServName}" [office]="${officeServName}" [paheko]="${pahekoServName}" [castopod]="${castopodServName}" [spip]="${spipServName}" )
DockerServNames=( [cloud]="${nextcloudServName}" [agora]="${mattermostServName}" [wiki]="${dokuwikiServName}" [wp]="${wordpressServName}" [office]="${officeServName}" [paheko]="${pahekoServName}" [castopod]="${castopodServName}" [spip]="${spipServName}" [webdav]="${webdavServName}")
declare -A FilterLsVolume # Pour trouver quel volume appartient à quel container
FilterLsVolume=( [cloud]="cloudMain" [agora]="matterConfig" [wiki]="wikiConf" [wp]="wordpress" [castopod]="castopodMedia" [spip]="spip")
+3
View File
@@ -94,9 +94,11 @@ traefikHost=dashboard
vaultwardenHost=koffre
vigiloHost=vigilo
webHost=
webdavHost=webdav
webmailHost=webmail
wordpressHost=wp
########################################
# ports internes
@@ -152,6 +154,7 @@ vaultwardenServName=vaultwardenServ
vaultwardenDBName=vaultwardenDB
vigiloServName=vigiloServ
vigiloDBName=vigiloDB
webdavServName=webdavServ
webServName=webServ
wordpressServName=wpServ
wordpressDBName=wpDB
+20 -2
View File
@@ -229,8 +229,26 @@ services:
volumes:
- spip:/usr/src/spip
#}}
#{{webdav
webdav:
image: httpd:2.4
container_name: ${orga}-${webdavServName}
restart: unless-stopped
networks:
- orgaNet
environment:
#surcharge dans compose.override.yml
- LDAP_USERS=
- DOMAIN=${domain}
- LDAP_ROOT=${ldap_root}
volumes:
- wordpress:/var/www/webdav
- ./webdav-conf/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
- ./webdav-conf/httpd-webdav.conf:/usr/local/apache2/conf/extra/httpd-webdav.conf:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.${orga}-${webdavServName}.rule=Host(`${orga}-${webdavHost}.${domain}`)"
#}}
#{{services
+109 -2
View File
@@ -5,7 +5,8 @@
#KAN: ???
#MAJ le 04/06/2026 by fab: créer une entrée orga dans le dns pour simplifier les url (avec utilisation de compose-override.yml)
#MAJ le 16/06/2026 by fab: ajouter le menu +/-webdav
#MAJ le 20/06/2026 by fab: générer le contenu du mail qui est à envoyer à l'orga après une création de service
# XXX pb arret des services retiré
@@ -40,8 +41,9 @@ usage(){
echo " +/- matter*|agora : on/off agora"
echo " +/- wiki : on/off wiki"
echo " +/- wp|word* : on/off wp"
echo " +/- webdav : on/off webdav"
echo " +/- casto*|pod : on/off castopod"
echo " +/- spip : on/off spip"
echo " +/- spip : on/off spip"
echo " x[GMk] : set quota"
echo " OrgaName : name must contain a-z0-9_\-"
}
@@ -149,6 +151,7 @@ export collabora=$(flagInCompose docker-compose.yml collabora: off)
export agora=$(flagInCompose docker-compose.yml agora: off)
export wiki=$(flagInCompose docker-compose.yml dokuwiki: off)
export wp=$(flagInCompose docker-compose.yml wordpress: off)
export webdav=$(flagInCompose docker-compose.yml webdav: off)
export castopod=$(flagInCompose docker-compose.yml castopod: off)
export spip=$(flagInCompose docker-compose.yml spip: off)
export db="off"
@@ -202,6 +205,9 @@ for ARG in "$@"; do
'-wp' | '-word'* )
wp="off"
;;
'-webdav' )
webdav="off"
;;
'-pod' | '-casto'* )
castopod="off"
;;
@@ -233,6 +239,9 @@ for ARG in "$@"; do
DBaInitialiser="$DBaInitialiser wp"
INITCMD2="$INITCMD2 -wp"
;;
'+webdav' )
webdav="on"
;;
'+pod' | '+casto'* )
castopod="on"
DBaInitialiser="$DBaInitialiser castopod"
@@ -316,6 +325,12 @@ if [[ "${wp}" = "on" ]]; then
else
DEL_DOMAIN+="${ORGA}-${wordpressHost} "
fi
if [[ "${webdav}" = "on" ]]; then
DOMAIN_AREA+=" - ${ORGA}-\${webdavServName}:${ORGA}-\${webdavHost}.\${domain}\n"
ADD_DOMAIN+="${ORGA}-${webdavHost} "
else
DEL_DOMAIN+="${ORGA}-${webdavHost} "
fi
if [[ "${castopod}" = "on" ]]; then
DOMAIN_AREA+=" - ${ORGA}-\${castopodServName}:${ORGA}-\${castopodHost}.\${domain}\n"
ADD_DOMAIN+="${ORGA}-${castopodHost} "
@@ -431,6 +446,8 @@ if [[ -n "${STAGE_DEFAULT}${STAGE_CREATE}" ]]; then
ln -sf ../../config/orgaTmpl/wiki-conf/
ln -sf ../../config/orgaTmpl/reload.sh
ln -sf ../../config/orgaTmpl/init-db.sh
ln -sf ../../config/orgaTmpl/webdav-conf/
fi
if [ ! -d "${KAZ_KEY_DIR}/orgas/$ORGA/" ]; then
@@ -494,6 +511,9 @@ if [[ -n "${STAGE_DEFAULT}" ]]; then
wp)
DockerServName="${ORGA}-${wordpressServName}"
;;
webdav)
DockerServName="${ORGA}-${webdavServName}"
;;
esac
if checkDockerRunning "${DockerServName}" "${service}"; then
printKazMsg " - stop ${service}"
@@ -524,3 +544,90 @@ if [[ -n "${STAGE_DEFAULT}" ]]; then
# ########## update status web page
${KAZ_COMP_DIR}/web/web-gen.sh
fi
##### DEBUT MAIL
#construction du mail qui peut être envoyé à l'orga en cas de création de services
if [[ -n "${STAGE_DEFAULT}${STAGE_CREATE}" ]]; then
GREEN='\e[32m'
RESET='\e[0m'
MAIL="Bonjour,
et hop ! voici les accès au(x) service(s) demandé(s):
"
if [[ "${wp}" = "on" ]]; then
MAIL_ADMIN=`grep WORDPRESS_ADMIN_USER /kaz/secret/orgas/${ORGA}/env-wpServ | cut -f2 -d=`
MAIL_ADMIN_PASS=`grep WORDPRESS_ADMIN_PASSWORD /kaz/secret/orgas/${ORGA}/env-wpServ | cut -f2 -d=`
MAIL="$MAIL
Site Web:
adresse: https://${ORGA}-wp.kaz.bzh
identifiant: ${MAIL_ADMIN}
mot de passe: ${MAIL_ADMIN_PASS}
doc: https://wiki.kaz.bzh/wordpress/start
La première chose à faire est de paramétrer ton site pour qu'il puisse envoyer des mails: https://wiki.kaz.bzh/wordpress/premiere_connexion
Si tu as envie d'avoir comme adresse de site , https://${ORGA}.kaz.bzh au lieu de https://${ORGA}-wp.kaz.bzh, fais nous signe !
"
fi
if [[ "${cloud}" = "on" ]]; then
MAIL_ADMIN=`grep NEXTCLOUD_ADMIN_USER /kaz/secret/orgas/${ORGA}/env-nextcloudServ | cut -f2 -d=`
MAIL_ADMIN_PASS=`grep NEXTCLOUD_ADMIN_PASSWORD /kaz/secret/orgas/${ORGA}/env-nextcloudServ | cut -f2 -d=`
MAIL="$MAIL
Cloud:
adresse: https://${ORGA}-cloud.kaz.bzh
identifiant: ${MAIL_ADMIN}
mot de passe: ${MAIL_ADMIN_PASS}
doc: https://wiki.kaz.bzh/nextcloud/start
La première chose à faire est de paramétrer ton cloud pour qu'il puisse envoyer des mails: https://wiki.kaz.bzh/nextcloud/administration/start#pour_parametrer_l_envoi_des_mails_de_notification_depuis_votre_cloud
"
fi
if [[ "${paheko}" = "on" ]]; then
MAIL_ADMIN_PASS=$(apg -n 1 -m 16 -M NCL)
MAIL="$MAIL
Paheko:
adresse: https://${ORGA}-paheko.kaz.bzh/admin/
identifiant: ${GREEN}--mettre ici le mail de l'orga--${RESET}
mot de passe: ${MAIL_ADMIN_PASS}
doc: https://wiki.kaz.bzh/paheko/start
"
fi
MAIL="$MAIL
Pour tes prochaines questions, nous t'invitons à les poser sur notre agora, dans le canal \"Un soucis, une question\" sur
https://agora.kaz.bzh/kaz/channels/une-question--un-soucis
Il faut te connecter avec ton compte kaz.
Ainsi, tout le monde pourra répondre mais aussi bénéficier des réponses apportées. On la joue collectif.
Bonne journée 😉
L'équipe Sysadmin, pour la collégiale de Kaz."
fi
echo -e "${GREEN}"
echo "*****************************************************"
echo "Voici le mail à copier/coller et à envoyer à l'orga :"
echo "*****************************************************"
echo -e "${RESET}"
echo -e "$MAIL"
echo -e "${GREEN}"
echo "MAIS AVANT D'ENVOYER CE MAIL, IL FAUT :
* completer la fiche paheko de l'orga en cochant les services crees"
if [[ "${paheko}" = "on" ]]; then
echo " * lancer /kaz/dockers/paheko/docker-compose-gen.sh, restart le docker puis finir d'installer paheko en allant sur https://${ORGA}-paheko.kaz.bzh/admin/"
fi
echo -e ${RESET}
##### FIN MAIL
+1
View File
@@ -54,6 +54,7 @@ OVERRIDE_FILE="compose.override.yml"
# sauvegarde si le fichier existe déjà
if [ -f "$OVERRIDE_FILE" ]; then
cp "$OVERRIDE_FILE" "${OVERRIDE_FILE}.$(date +%Y%m%d-%H%M%S).bak"
echo "'tention, un $OVERRIDE_FILE existe déjà, il vient d'être sauvegardé !"
fi
#on récupère toutes les variables utiles
@@ -12,11 +12,13 @@ Alias / /var/www/webdav/
AuthName "WebDAV LDAP"
AuthBasicProvider ldap
#variables présentes dans /kaz/secret/env-ldapServ
AuthLDAPURL ${LDAP_URL}
AuthLDAPBindDN ${LDAP_BIND_DN}
AuthLDAPBindPassword ${LDAP_ADMIN_PASSWORD}
AuthLDAPURL ldaps://ldap.${DOMAIN}:636/ou=users,${LDAP_ROOT}?mail?sub
AuthLDAPInitialBindPattern (.+) cn=$1,ou=users,${LDAP_ROOT}
AuthLDAPInitialBindAsUser on
AuthLDAPCompareAsUser on
AuthLDAPSearchAsUser on
#variable présente dans le docker-compose.yml de l'orga
Require ldap-user ${LDAP_USERS}
</Directory>
</Directory>
+1
View File
@@ -16,6 +16,7 @@ olcAccess: {1}to dn.subtree="$LDAPROOT"
by dn="cn=mobilizon,ou=applications,$LDAPROOT" read
by dn="cn=mastodon,ou=applications,$LDAPROOT" read
by dn="$BINDDN" write
by users search
by * none
olcAccess: {2}to *
by dn="$BINDDN" write
+2 -2
View File
@@ -3,7 +3,7 @@
services:
app:
image: mattermost/mattermost-team-edition:11.6.1
image: mattermost/mattermost-team-edition:11.7.7
container_name: ${mattermostServName}
restart: ${restartPolicy}
volumes:
@@ -16,7 +16,7 @@ services:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /etc/environment:/etc/environment:ro
- ./mostlymatter-amd64-v11.6.1:/mattermost/bin/mattermost
- ./mostlymatter-amd64-v11.7.7:/mattermost/bin/mattermost
env_file:
- ../../secret/env-${mattermostServName}
environment:
+1 -1
View File
@@ -1,6 +1,6 @@
services:
reverse-proxy:
image: traefik:v3.7.1
image: traefik:v3.7.5
container_name: ${traefikServName}
restart: ${restartPolicy}
# Enables the web UI and tells Traefik to listen to docker
-4
View File
@@ -8,7 +8,3 @@ LDAP_MATTERMOST_PASSWORD=@@pass@@ldapmm@@p@@
LDAP_CLOUD_PASSWORD=@@pass@@ldapcloud@@p@@
LDAP_MOBILIZON_PASSWORD=@@pass@@ldapmobilizon@@p@@
LDAP_MASTODON_PASSWORD=@@pass@@ldapmastodon@@p@@
#utilisé pour webdav
LDAP_URL=
LDAP_BIND_DN=