devzone 0.18.5 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/cluster.sh +16 -2
- package/.devcontainer/demarrage.sh +5 -2
- package/.devcontainer/devzone +21 -1
- package/.devcontainer/gitlab/gitlab.sh +13 -1
- package/.devcontainer/password.sh +101 -0
- package/.devcontainer/postgres/postgres.sh +13 -0
- package/README.md +21 -0
- package/manage/devzone +1 -0
- package/package.json +1 -1
package/.devcontainer/cluster.sh
CHANGED
|
@@ -211,6 +211,20 @@ cluster_choisir() {
|
|
|
211
211
|
fi
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
# Cree un cluster kind sans basculer le contexte courant de kubectl.
|
|
215
|
+
# Le code de kind est rendu meme sous set -e : la restauration a lieu avant.
|
|
216
|
+
kind_creer_sans_basculer() {
|
|
217
|
+
local precedent code=0
|
|
218
|
+
precedent="$(kubectl config current-context 2>/dev/null || true)"
|
|
219
|
+
kind create cluster "$@" || code=$?
|
|
220
|
+
if [ -n "$precedent" ]; then
|
|
221
|
+
kubectl config use-context "$precedent" >/dev/null 2>&1 || true
|
|
222
|
+
else
|
|
223
|
+
KUBECONFIG="$HOME/.kube/config" kubectl config unset current-context >/dev/null 2>&1 || true
|
|
224
|
+
fi
|
|
225
|
+
return "$code"
|
|
226
|
+
}
|
|
227
|
+
|
|
214
228
|
cluster_preparer() {
|
|
215
229
|
local ctx="$1"
|
|
216
230
|
if [ "$ctx" = "$CLUSTER_DEDIE" ]; then
|
|
@@ -222,10 +236,10 @@ cluster_preparer() {
|
|
|
222
236
|
# Docker de l'hôte chargé (son Kubernetes, d'autres clusters) : l'API du
|
|
223
237
|
# nœud peut redémarrer pendant l'initialisation et kind abandonne à
|
|
224
238
|
# quelques secondes près. Une seconde tentative, sur un cluster neuf.
|
|
225
|
-
if !
|
|
239
|
+
if ! kind_creer_sans_basculer --name "devzone${INSTANCE_SUFFIX}" --wait 120s; then
|
|
226
240
|
echo "▶ Nouvelle tentative de création du cluster kind…"
|
|
227
241
|
kind delete cluster --name "devzone${INSTANCE_SUFFIX}" >/dev/null 2>&1 || true
|
|
228
|
-
|
|
242
|
+
kind_creer_sans_basculer --name "devzone${INSTANCE_SUFFIX}" --wait 120s || return 1
|
|
229
243
|
fi
|
|
230
244
|
kube_joignable_depuis_conteneur "$HOME/.kube/config"
|
|
231
245
|
fi
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
# À chaque démarrage, dans l'ordre : relais du socket Docker (#293), identité git
|
|
3
3
|
# (déduite du compte gh), clusters Kubernetes, nom gitlab.localhost et relais
|
|
4
4
|
# 8929/2224 du module gitlab s'il est actif, relais du module postgres s'il est
|
|
5
|
-
# actif, relais de ports vers le poste,
|
|
6
|
-
# faire (devzone).
|
|
5
|
+
# actif, relais de ports vers le poste, identifiants regroupés (.password), puis
|
|
6
|
+
# récapitulatif de ce qui reste à faire (devzone).
|
|
7
7
|
# Séquentiel : le récapitulatif voit l'identité tout juste posée ; l'échec
|
|
8
8
|
# d'une étape n'empêche pas les suivantes.
|
|
9
9
|
# Jamais de question (gh, kubectl et ses plugins d'authentification) : sortie
|
|
@@ -32,5 +32,8 @@ fi
|
|
|
32
32
|
# Relais de ports vers le poste (#290) : l'IP du conteneur change à chaque
|
|
33
33
|
# démarrage, chaque relais de l'état est recréé ; un échec n'empêche rien
|
|
34
34
|
bash "$ICI/ports.sh" relancer || echo "démarrage : relais de ports non relancés (devzone port <n>)"
|
|
35
|
+
# Vue regroupée des identifiants (#332), regénérée à chaque démarrage ; un
|
|
36
|
+
# échec n'empêche rien et le contenu n'est jamais affiché
|
|
37
|
+
bash "$ICI/password.sh" regenerer || echo "démarrage : identifiants regroupés non mis à jour (devzone mots-de-passe)"
|
|
35
38
|
echo
|
|
36
39
|
bash "$ICI/devzone"
|
package/.devcontainer/devzone
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
# devzone postgres creer <projet> base et utilisateur d'un projet (aussi : liste, psql, supprimer)
|
|
16
16
|
# devzone cluster [CTX] [--oui] cluster des services de devzone, ou en changer
|
|
17
17
|
# devzone port [<n>|--fermer <n>] relais d'un port du conteneur vers le poste
|
|
18
|
+
# devzone mots-de-passe régénère .password et affiche son chemin
|
|
18
19
|
#
|
|
19
20
|
# État propre à chaque instance : $RACINE/.devzone.modules (dossier monté
|
|
20
21
|
# de l'hôte, survit aux rebuilds), une ligne « module=on|off » ; la plateforme
|
|
@@ -670,7 +671,7 @@ worktrees_absents() {
|
|
|
670
671
|
# État complet : ✔ prêt, ✖ nécessaire, ○ facultatif, ⚠ à corriger ; chaque
|
|
671
672
|
# point à faire avec sa commande (affiché à chaque démarrage)
|
|
672
673
|
etat() {
|
|
673
|
-
local nom email statut m retards chemin ports_etat relais_marque
|
|
674
|
+
local nom email statut m retards chemin ports_etat relais_marque ctx_travail ctx_hote
|
|
674
675
|
echo "devzone : état (devzone pour le réafficher)"
|
|
675
676
|
nom="$(git config --get user.name || true)"
|
|
676
677
|
email="$(git config --get user.email || true)"
|
|
@@ -730,11 +731,25 @@ etat() {
|
|
|
730
731
|
if [ -n "$cluster_actuel" ] && ! cluster_est_local "$cluster_actuel"; then
|
|
731
732
|
printf ' ⚠ cluster distant : %s — services sur un cluster distant\n' "$cluster_actuel"
|
|
732
733
|
fi
|
|
734
|
+
# Cluster de travail interne (kind) : avertissement dans le recapitulatif
|
|
735
|
+
ctx_travail="$(kubectl config current-context 2>/dev/null || true)"
|
|
736
|
+
case "$ctx_travail" in
|
|
737
|
+
kind-gitlab* | kind-devzone*)
|
|
738
|
+
ctx_hote="$(KUBECONFIG="${DEVZONE_KUBE_HOTE:-$HOME/.kube/hote.config}" kubectl config current-context 2>/dev/null || true)"
|
|
739
|
+
if [ -n "$ctx_hote" ] && cluster_joignable "$ctx_hote"; then
|
|
740
|
+
printf ' ⚠ cluster de travail : %s (cluster interne de devzone) ; revenir : kubectl config use-context %s\n' "$ctx_travail" "$ctx_hote"
|
|
741
|
+
fi
|
|
742
|
+
;;
|
|
743
|
+
esac
|
|
733
744
|
ports_etat="$(bash "$ICI/ports.sh" resume 2>/dev/null || true)"
|
|
734
745
|
case "$ports_etat" in
|
|
735
746
|
aucun*) printf ' ○ ports vers le poste %s\n' "$ports_etat" ;;
|
|
736
747
|
*) printf ' ✔ ports vers le poste %s\n' "$ports_etat" ;;
|
|
737
748
|
esac
|
|
749
|
+
# Identifiants regroupés (#332) : le chemin seulement, jamais le contenu
|
|
750
|
+
if [ -f "$RACINE/.password" ]; then
|
|
751
|
+
printf ' ○ identifiants : %s\n' "$RACINE/.password"
|
|
752
|
+
fi
|
|
738
753
|
# Marque posée par docker-relais.sh au démarrage (#293) : docker exec
|
|
739
754
|
# longs coupés, kind et modules en échec
|
|
740
755
|
relais_marque="${DEVZONE_RELAIS_MARQUE:-/tmp/devzone-relais-docker.echec}"
|
|
@@ -778,6 +793,11 @@ case "${1:-}" in
|
|
|
778
793
|
cluster) changer_cluster "${@:2}" ;;
|
|
779
794
|
postgres) DEVZONE_ETAT="$ETAT" bash "$ICI/postgres/postgres.sh" "${@:2}" ;;
|
|
780
795
|
port) DEVZONE_ETAT="$ETAT" bash "$ICI/ports.sh" "${@:2}" ;;
|
|
796
|
+
mots-de-passe)
|
|
797
|
+
bash "$ICI/password.sh" regenerer ||
|
|
798
|
+
echo "devzone : identifiants regroupés non mis à jour" >&2
|
|
799
|
+
bash "$ICI/password.sh" chemin
|
|
800
|
+
;;
|
|
781
801
|
-h | --help | aide) awk 'NR==1{next} /^#$/{exit} /^#/{sub(/^# ?/,""); print; next} {exit}' "${BASH_SOURCE[0]}" ;;
|
|
782
802
|
test-bash32) bash "$RACINE/manage/test/bash32.sh" ;;
|
|
783
803
|
test-gitlab) DEVZONE_ETAT="$ETAT" bash "$ICI/gitlab/test-gitlab.sh" "${@:2}" ;;
|
|
@@ -10,6 +10,9 @@ ICI="$(cd "$(dirname "$0")" && pwd)"
|
|
|
10
10
|
RACINE="${DEVZONE_RACINE:-$(dirname "$(dirname "$ICI")")}"
|
|
11
11
|
# shellcheck source=SCRIPTDIR/../cluster.sh
|
|
12
12
|
. "$ICI/../cluster.sh"
|
|
13
|
+
# shellcheck source=SCRIPTDIR/../password.sh
|
|
14
|
+
# shellcheck disable=SC1091
|
|
15
|
+
. "$ICI/../password.sh"
|
|
13
16
|
|
|
14
17
|
# ---- Variables de délai (secondes) ----
|
|
15
18
|
# GITLAB_ATTENTE : attente globale d'installation (défaut 1200)
|
|
@@ -19,6 +22,12 @@ GITLAB_ATTENTE="${GITLAB_ATTENTE:-1200}"
|
|
|
19
22
|
# Secrets stockés dans $RACINE/workspace/.gitlab/ (chmod 600), jamais affichés.
|
|
20
23
|
GITLAB_SECRETS_DIR="$RACINE/workspace/.gitlab"
|
|
21
24
|
|
|
25
|
+
# Vue regroupée des identifiants : un échec n'empêche jamais l'opération
|
|
26
|
+
regenerer_identifiants() {
|
|
27
|
+
password_regenerer ||
|
|
28
|
+
echo "devzone : gitlab : identifiants regroupés non mis à jour (devzone mots-de-passe)" >&2
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
# ---- /etc/hosts du conteneur ----
|
|
23
32
|
# DEVZONE_HOSTS pour les tests (jamais le /etc/hosts réel)
|
|
24
33
|
HOSTS="${DEVZONE_HOSTS:-/etc/hosts}"
|
|
@@ -168,6 +177,7 @@ gitlab_seed() {
|
|
|
168
177
|
# Déjà poussé (installation relancée) : rien à refaire
|
|
169
178
|
if curl -sf --header "PRIVATE-TOKEN: $push_token" "http://gitlab.localhost:8929/api/v4/projects/devzone%2Fdemo/repository/branches/main" >/dev/null 2>&1; then
|
|
170
179
|
echo "✔ Seed GitLab terminé (projet demo déjà poussé)."
|
|
180
|
+
regenerer_identifiants
|
|
171
181
|
return 0
|
|
172
182
|
fi
|
|
173
183
|
if [ -d "$ICI/demo" ]; then
|
|
@@ -202,6 +212,7 @@ gitlab_seed() {
|
|
|
202
212
|
fi
|
|
203
213
|
|
|
204
214
|
echo "✔ Seed GitLab terminé."
|
|
215
|
+
regenerer_identifiants
|
|
205
216
|
}
|
|
206
217
|
|
|
207
218
|
# ---- relais TCP 127.0.0.1:8929/2224 vers le nœud kind ----
|
|
@@ -390,7 +401,7 @@ gitlab_installer() {
|
|
|
390
401
|
local cree=false
|
|
391
402
|
if ! kind get clusters 2>/dev/null | grep -qx "gitlab${INSTANCE_SUFFIX}"; then
|
|
392
403
|
echo "▶ Création du cluster kind gitlab…"
|
|
393
|
-
|
|
404
|
+
kind_creer_sans_basculer --name "gitlab${INSTANCE_SUFFIX}" --config "$ICI/kind.yaml" --wait 120s
|
|
394
405
|
kube_joignable_depuis_conteneur "$HOME/.kube/config"
|
|
395
406
|
cree=true
|
|
396
407
|
fi
|
|
@@ -494,6 +505,7 @@ gitlab_desinstaller() {
|
|
|
494
505
|
gitlab_hote_retirer
|
|
495
506
|
|
|
496
507
|
echo "✔ GitLab désinstallé."
|
|
508
|
+
regenerer_identifiants
|
|
497
509
|
}
|
|
498
510
|
|
|
499
511
|
# ---- etat : vérifier l'état de GitLab ----
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Identifiants regroupés des comptes créés par devzone (#332).
|
|
3
|
+
# password.sh regenerer lit les fichiers des modules, écrit $RACINE/.password
|
|
4
|
+
# password.sh chemin affiche le chemin de $RACINE/.password
|
|
5
|
+
# Les fichiers des modules restent la source : .password est une vue régénérée.
|
|
6
|
+
# Secrets en clair : jamais affichés, jamais commités (.gitignore), droits 600.
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
PASSWORD_ICI="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
10
|
+
PASSWORD_RACINE="${DEVZONE_RACINE:-$(dirname "$PASSWORD_ICI")}"
|
|
11
|
+
PASSWORD_CIBLE="$PASSWORD_RACINE/.password"
|
|
12
|
+
|
|
13
|
+
# Régénère $RACINE/.password à partir de workspace/.gitlab et
|
|
14
|
+
# workspace/.postgres. Silencieux en cas de succès ; sans aucun compte, le
|
|
15
|
+
# fichier est supprimé.
|
|
16
|
+
password_regenerer() (
|
|
17
|
+
umask 077
|
|
18
|
+
local cible="$PASSWORD_CIBLE" racine="$PASSWORD_RACINE"
|
|
19
|
+
local gl="$racine/workspace/.gitlab" pg="$racine/workspace/.postgres"
|
|
20
|
+
local tab entrees tmp fichier nom service adresse utilisateur mdp
|
|
21
|
+
tab="$(printf '\t')"
|
|
22
|
+
entrees="$(mktemp "$racine/.password.entrees.XXXXXX")" || return 1
|
|
23
|
+
tmp=""
|
|
24
|
+
|
|
25
|
+
if [ -s "$gl/root-password" ]; then
|
|
26
|
+
mdp="$(cat "$gl/root-password")"
|
|
27
|
+
if [ -n "$mdp" ]; then
|
|
28
|
+
printf 'gitlab\t%s\troot\t%s\n' "http://gitlab.localhost:8929" "$mdp" >>"$entrees"
|
|
29
|
+
fi
|
|
30
|
+
fi
|
|
31
|
+
if [ -s "$gl/dev-password" ]; then
|
|
32
|
+
mdp="$(cat "$gl/dev-password")"
|
|
33
|
+
if [ -n "$mdp" ]; then
|
|
34
|
+
printf 'gitlab\t%s\tdev\t%s\n' "http://gitlab.localhost:8929" "$mdp" >>"$entrees"
|
|
35
|
+
fi
|
|
36
|
+
fi
|
|
37
|
+
if [ -s "$pg/admin-password" ]; then
|
|
38
|
+
mdp="$(cat "$pg/admin-password")"
|
|
39
|
+
if [ -n "$mdp" ]; then
|
|
40
|
+
printf 'postgres\t%s\tpostgres\t%s\n' "127.0.0.1:5432" "$mdp" >>"$entrees"
|
|
41
|
+
fi
|
|
42
|
+
fi
|
|
43
|
+
for fichier in "$pg"/*.env; do
|
|
44
|
+
[ -f "$fichier" ] || continue
|
|
45
|
+
nom="${fichier##*/}"
|
|
46
|
+
nom="${nom%.env}"
|
|
47
|
+
service="postgres:$nom"
|
|
48
|
+
utilisateur="$(sed -n 's/^DB_USER=//p' "$fichier" 2>/dev/null | tail -1 || true)"
|
|
49
|
+
mdp="$(sed -n 's/^DB_PASSWORD=//p' "$fichier" 2>/dev/null | tail -1 || true)"
|
|
50
|
+
adresse="$(sed -n 's/^DB_NAME=//p' "$fichier" 2>/dev/null | tail -1 || true)"
|
|
51
|
+
if [ -z "$utilisateur" ] || [ -z "$mdp" ]; then
|
|
52
|
+
continue
|
|
53
|
+
fi
|
|
54
|
+
adresse="127.0.0.1:5432/${adresse:-$nom}"
|
|
55
|
+
printf '%s\t%s\t%s\t%s\n' "$service" "$adresse" "$utilisateur" "$mdp" >>"$entrees"
|
|
56
|
+
done
|
|
57
|
+
|
|
58
|
+
if [ ! -s "$entrees" ]; then
|
|
59
|
+
rm -f "$entrees" "$cible"
|
|
60
|
+
return 0
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
tmp="$(mktemp "$racine/.password.XXXXXX")" || {
|
|
64
|
+
rm -f "$entrees"
|
|
65
|
+
return 1
|
|
66
|
+
}
|
|
67
|
+
{
|
|
68
|
+
printf '%s\n' \
|
|
69
|
+
'# devzone : identifiants des comptes créés par devzone. Secrets en clair :' \
|
|
70
|
+
'# ne jamais commiter, copier ni coller dans un ticket. Régénéré par devzone.' \
|
|
71
|
+
"# service${tab}adresse${tab}utilisateur${tab}mot de passe"
|
|
72
|
+
LC_ALL=C sort -t "$tab" -k1,1 -k3,3 "$entrees"
|
|
73
|
+
} >"$tmp" || {
|
|
74
|
+
rm -f "$entrees" "$tmp"
|
|
75
|
+
return 1
|
|
76
|
+
}
|
|
77
|
+
chmod 600 "$tmp" || {
|
|
78
|
+
rm -f "$entrees" "$tmp"
|
|
79
|
+
return 1
|
|
80
|
+
}
|
|
81
|
+
mv "$tmp" "$cible" || {
|
|
82
|
+
rm -f "$entrees" "$tmp"
|
|
83
|
+
return 1
|
|
84
|
+
}
|
|
85
|
+
chmod 600 "$cible" || {
|
|
86
|
+
rm -f "$entrees"
|
|
87
|
+
return 1
|
|
88
|
+
}
|
|
89
|
+
rm -f "$entrees"
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
|
|
93
|
+
case "${1:-}" in
|
|
94
|
+
regenerer) password_regenerer ;;
|
|
95
|
+
chemin) printf '%s\n' "$PASSWORD_CIBLE" ;;
|
|
96
|
+
*)
|
|
97
|
+
echo "devzone : password.sh : regenerer | chemin" >&2
|
|
98
|
+
exit 1
|
|
99
|
+
;;
|
|
100
|
+
esac
|
|
101
|
+
fi
|
|
@@ -15,6 +15,9 @@ RACINE="${DEVZONE_RACINE:-$(dirname "$(dirname "$ICI")")}"
|
|
|
15
15
|
ETAT="${DEVZONE_ETAT:-$RACINE/.devzone.modules}"
|
|
16
16
|
# shellcheck source=SCRIPTDIR/../cluster.sh
|
|
17
17
|
. "$ICI/../cluster.sh"
|
|
18
|
+
# shellcheck source=SCRIPTDIR/../password.sh
|
|
19
|
+
# shellcheck disable=SC1091
|
|
20
|
+
. "$ICI/../password.sh"
|
|
18
21
|
|
|
19
22
|
NS=devzone-postgres
|
|
20
23
|
SECRETS="$RACINE/workspace/.postgres"
|
|
@@ -25,6 +28,12 @@ POSTGRES_TAILLE="${POSTGRES_TAILLE:-5Gi}"
|
|
|
25
28
|
|
|
26
29
|
refuse() { echo "devzone : postgres : $*" >&2; exit 2; }
|
|
27
30
|
|
|
31
|
+
# Vue regroupée des identifiants : un échec n'empêche jamais l'opération
|
|
32
|
+
regenerer_identifiants() {
|
|
33
|
+
password_regenerer ||
|
|
34
|
+
echo "devzone : postgres : identifiants regroupés non mis à jour (devzone mots-de-passe)" >&2
|
|
35
|
+
}
|
|
36
|
+
|
|
28
37
|
# Contexte du module : celui du cluster de devzone ; sans choix, rien n'est
|
|
29
38
|
# installé (devzone activer postgres le fixe)
|
|
30
39
|
contexte() {
|
|
@@ -100,6 +109,7 @@ installer() {
|
|
|
100
109
|
relais_lancer postgres "$CTX" "$NS" svc/postgres "$POSTGRES_PORT:5432"
|
|
101
110
|
echo "✔ PostgreSQL prêt : 127.0.0.1:$POSTGRES_PORT dans le conteneur"
|
|
102
111
|
echo " Base d'un projet : devzone postgres creer <projet>"
|
|
112
|
+
regenerer_identifiants
|
|
103
113
|
}
|
|
104
114
|
|
|
105
115
|
desinstaller() {
|
|
@@ -112,6 +122,7 @@ desinstaller() {
|
|
|
112
122
|
fi
|
|
113
123
|
rm -rf "$SECRETS"
|
|
114
124
|
echo "✔ PostgreSQL désinstallé."
|
|
125
|
+
regenerer_identifiants
|
|
115
126
|
}
|
|
116
127
|
|
|
117
128
|
nombre_bases() {
|
|
@@ -172,6 +183,7 @@ DB_URL=jdbc:postgresql://127.0.0.1:$POSTGRES_PORT/$projet
|
|
|
172
183
|
ENV
|
|
173
184
|
)
|
|
174
185
|
echo "✔ base $projet prête ; identifiants : $fichier"
|
|
186
|
+
regenerer_identifiants
|
|
175
187
|
}
|
|
176
188
|
|
|
177
189
|
liste() {
|
|
@@ -220,6 +232,7 @@ DROP ROLE IF EXISTS $projet;
|
|
|
220
232
|
SQL
|
|
221
233
|
rm -f "$SECRETS/$projet.env"
|
|
222
234
|
echo "✔ base $projet supprimée"
|
|
235
|
+
regenerer_identifiants
|
|
223
236
|
}
|
|
224
237
|
|
|
225
238
|
relais() {
|
package/README.md
CHANGED
|
@@ -127,6 +127,27 @@ Pour en savoir plus : [Mettre en route un projet](https://github.com/SimBienvenu
|
|
|
127
127
|
|
|
128
128
|
Ces modules sont désactivés par défaut, activables à la demande depuis le conteneur (sans rebuild), et leur choix est conservé d'un démarrage à l'autre.
|
|
129
129
|
|
|
130
|
+
## Où sont mes identifiants ?
|
|
131
|
+
|
|
132
|
+
Les comptes créés par devzone sont regroupés dans `.password`, à la racine de devzone (à côté de `.devzone.modules`). Une ligne par compte, colonnes séparées par des tabulations :
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
# service adresse utilisateur mot de passe
|
|
136
|
+
gitlab http://gitlab.localhost:8929 root …
|
|
137
|
+
postgres 127.0.0.1:5432 postgres …
|
|
138
|
+
postgres:monprojet 127.0.0.1:5432/monprojet monprojet …
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Le fichier est lisible par toi seul (600) et ignoré par git : ne le copie ni ne le commit jamais. Il est régénéré à chaque création, suppression ou changement de compte (modules `gitlab` et `postgres`, seed GitLab, démarrage) :
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
devzone mots-de-passe # régénère le fichier et affiche seulement son chemin
|
|
145
|
+
devzone postgres creer <projet> # création, ou nouveau mot de passe avec --nouveau-mdp
|
|
146
|
+
devzone postgres supprimer <projet> # suppression du compte et de sa ligne
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Les fichiers des modules restent la source : `workspace/.postgres/<projet>.env`, `workspace/.postgres/admin-password`, `workspace/.gitlab/root-password` et `workspace/.gitlab/dev-password`.
|
|
150
|
+
|
|
130
151
|
## Accéder à PostgreSQL
|
|
131
152
|
|
|
132
153
|
Le module `postgres` installe un PostgreSQL 16 partagé sur le cluster de devzone : une base et un utilisateur par projet. Toutes les commandes se lancent dans le conteneur (`make shell`).
|
package/manage/devzone
CHANGED
package/package.json
CHANGED