Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0bf571cb93 | ||
|
|
acf7521990 | ||
|
|
9c0a111f82 | ||
|
|
1f25869c4f | ||
|
|
cef3dd3a28 | ||
|
|
25276ad5b1 |
No files matched your search
@@ -32,6 +32,12 @@ JWT_SECRET="$(random_secret)"
|
|||||||
COOKIE_SECRET="$(random_secret)"
|
COOKIE_SECRET="$(random_secret)"
|
||||||
REVALIDATE_SECRET="$(random_secret)"
|
REVALIDATE_SECRET="$(random_secret)"
|
||||||
|
|
||||||
|
# Mismo valor para las dos claves: MEILI_MASTER_KEY la lee el propio
|
||||||
|
# contenedor getmeili/meilisearch (servidor), MEILISEARCH_API_KEY la lee
|
||||||
|
# el plugin @rokmohar/medusa-plugin-meilisearch en Medusa (cliente) --
|
||||||
|
# cada lado usa su propia convencion de nombre de env var.
|
||||||
|
MEILI_MASTER_KEY="$(random_secret)"
|
||||||
|
|
||||||
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres-svc:5432/${POSTGRES_DB}?sslmode=disable"
|
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres-svc:5432/${POSTGRES_DB}?sslmode=disable"
|
||||||
REDIS_URL="redis://:${REDIS_PASSWORD}@redis-svc:6379"
|
REDIS_URL="redis://:${REDIS_PASSWORD}@redis-svc:6379"
|
||||||
|
|
||||||
@@ -49,6 +55,8 @@ kubectl -n "${NAMESPACE}" create secret generic commerce-secrets \
|
|||||||
--from-literal=JWT_SECRET="${JWT_SECRET}" \
|
--from-literal=JWT_SECRET="${JWT_SECRET}" \
|
||||||
--from-literal=COOKIE_SECRET="${COOKIE_SECRET}" \
|
--from-literal=COOKIE_SECRET="${COOKIE_SECRET}" \
|
||||||
--from-literal=REVALIDATE_SECRET="${REVALIDATE_SECRET}" \
|
--from-literal=REVALIDATE_SECRET="${REVALIDATE_SECRET}" \
|
||||||
|
--from-literal=MEILI_MASTER_KEY="${MEILI_MASTER_KEY}" \
|
||||||
|
--from-literal=MEILISEARCH_API_KEY="${MEILI_MASTER_KEY}" \
|
||||||
--dry-run=client \
|
--dry-run=client \
|
||||||
-o yaml |
|
-o yaml |
|
||||||
kubectl apply -f -
|
kubectl apply -f -
|
||||||
|
|||||||
@@ -449,7 +449,11 @@ CLUSTER_WIDE_SNAPSHOT="$("$KUBECTL_BIN" get pods -A -o custom-columns='NS:.metad
|
|||||||
|
|
||||||
PUBLIC_CHECKS=""
|
PUBLIC_CHECKS=""
|
||||||
for d in $PUBLIC_DOMAINS; do
|
for d in $PUBLIC_DOMAINS; do
|
||||||
code="$(curl -s -o /dev/null -w '%{http_code}' --max-time 10 "https://${d}/" 2>/dev/null || echo "000")"
|
# -L: sigue redirects (ej. commerce.cruzcloud.net/ -> /app vía Middleware
|
||||||
|
# de Traefik) para reportar el estado final real, sin tener que
|
||||||
|
# hardcodear una ruta distinta por dominio en este script — el routing
|
||||||
|
# decide el path, no este check.
|
||||||
|
code="$(curl -sL -o /dev/null -w '%{http_code}' --max-time 10 "https://${d}/" 2>/dev/null || echo "000")"
|
||||||
PUBLIC_CHECKS="${PUBLIC_CHECKS}${d} -> HTTP ${code}\n"
|
PUBLIC_CHECKS="${PUBLIC_CHECKS}${d} -> HTTP ${code}\n"
|
||||||
log "curl https://${d}/ -> HTTP ${code}"
|
log "curl https://${d}/ -> HTTP ${code}"
|
||||||
done
|
done
|
||||||
|
|||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
# Reconecta a la sesion tmux persistente "lab" dentro del contenedor
|
||||||
|
# tmux-host. Si la sesion no existe (p.ej. el contenedor se acaba de
|
||||||
|
# recrear), la crea. El comando es siempre el mismo sin importar el
|
||||||
|
# estado previo.
|
||||||
|
#
|
||||||
|
# Ver docs-portal: arquitectura/sesion-tmux-persistente.md
|
||||||
|
|
||||||
|
CONTAINER="tmux-host"
|
||||||
|
SESSION="lab"
|
||||||
|
|
||||||
|
if ! docker ps --format '{{.Names}}' | grep -qx "$CONTAINER"; then
|
||||||
|
echo "El contenedor '$CONTAINER' no esta corriendo. Verifica con 'docker ps -a'." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker exec -it "$CONTAINER" tmux attach -t "$SESSION" || \
|
||||||
|
docker exec -it "$CONTAINER" tmux new -s "$SESSION"
|
||||||
Reference in new issue
Block a user