feat: completar despliegue en produccion CT 132 con supervision de SIAX Monitor y reinicio atomico
This commit is contained in:
+12
-5
@@ -63,10 +63,12 @@ subir() {
|
||||
preparar_remoto
|
||||
|
||||
echo ""
|
||||
echo "🚀 Subiendo binario, plantillas y scripts al servidor..."
|
||||
copy "$SCRIPT_DIR/app_compartir" "$SCRIPT_DIR/init.sh" "$SCRIPT_DIR/.env.example" "$SCRIPT_DIR/siax-app-DROP_SIGMAC_APP.service" "$SERVIDOR:$REMOTE_DIR/"
|
||||
echo "🚀 Subiendo binario (atómico), plantillas y scripts al servidor..."
|
||||
copy "$SCRIPT_DIR/app_compartir" "$SERVIDOR:$REMOTE_DIR/app_compartir.tmp"
|
||||
remote "mv -f '$REMOTE_DIR/app_compartir.tmp' '$REMOTE_DIR/app_compartir' && chmod 0755 '$REMOTE_DIR/app_compartir'"
|
||||
copy "$SCRIPT_DIR/init.sh" "$SCRIPT_DIR/.env.example" "$SCRIPT_DIR/siax-app-DROP_SIGMAC_APP.service" "$SERVIDOR:$REMOTE_DIR/"
|
||||
copy "$SCRIPT_DIR/web/templates/"*.html "$SERVIDOR:$REMOTE_DIR/web/templates/"
|
||||
remote "chmod 0755 '$REMOTE_DIR/app_compartir' '$REMOTE_DIR/init.sh'"
|
||||
remote "chmod 0755 '$REMOTE_DIR/init.sh'"
|
||||
echo "✅ Archivos sincronizados en $REMOTE_DIR"
|
||||
}
|
||||
|
||||
@@ -94,15 +96,20 @@ estado() {
|
||||
echo ""
|
||||
echo "📊 Estado del servidor en $SERVIDOR:"
|
||||
remote "
|
||||
if curl -sI http://localhost:8080/api/apps 2>/dev/null | grep -q '200 OK'; then
|
||||
echo '==> Estado en SIAX Monitor (:8080):'
|
||||
curl -s http://localhost:8080/api/apps | grep -o '{\"name\":\"DROP_SIGMAC_APP\"[^}]*}' || true
|
||||
echo ''
|
||||
fi
|
||||
if systemctl is-active --quiet siax-app-DROP_SIGMAC_APP.service 2>/dev/null; then
|
||||
echo '==> Servicio systemd siax-app-DROP_SIGMAC_APP (SIAX Monitor) activo:'
|
||||
systemctl status siax-app-DROP_SIGMAC_APP.service --no-pager
|
||||
journalctl -u siax-app-DROP_SIGMAC_APP.service -n 12 --no-pager -q
|
||||
elif tmux has-session -t drop-sigmac-app 2>/dev/null; then
|
||||
echo '==> Sesión tmux drop-sigmac-app activa:'
|
||||
tmux capture-pane -pt drop-sigmac-app | tail -n 25
|
||||
elif systemctl is-active --quiet drop-sigmac-app.service 2>/dev/null; then
|
||||
echo '==> Servicio systemd drop-sigmac-app activo:'
|
||||
systemctl status drop-sigmac-app.service --no-pager
|
||||
journalctl -u drop-sigmac-app.service -n 12 --no-pager -q
|
||||
else
|
||||
echo '⚠️ No se detectó proceso activo en tmux ni systemd.'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user