Something went wrong. Try again.
Substratum: DID-native private IPFS infrastructure for the AT Protocol. Your identity is the access key. substratum.cloud
Something went wrong. Try again.
123456789101112131415161718192021#!/usr/bin/env bash# Shared helpers for local Compose scripts (devcontainer detection, gateway readiness).# shellcheck shell=bash
# True when running inside the VS Code / Cursor Dev Container (or Codespaces).# Agent shells often omit REMOTE_CONTAINERS; fall back to DinD + .devcontainer layout.substratum_in_devcontainer() { if [ -n "${REMOTE_CONTAINERS:-}" ] || [ -n "${CODESPACES:-}" ] || [ "${DEVCONTAINER:-}" = "true" ]; then return 0 fi [ -f /.dockerenv ] && [ -f /usr/local/share/docker-init.sh ] && [ -d "${1:-.}/.devcontainer" ]}
# True when nginx edge already serves a healthy gateway (postAttach `npm run dev`).substratum_gateway_healthy() { local url="${E2E_GATEWAY_HEALTH_URL:-http://127.0.0.1:8080/api/health}" local body body="$(curl -fsS --max-time 3 "${url}" 2>/dev/null)" || return 1 printf '%s' "${body}" | grep -q '"status"[[:space:]]*:[[:space:]]*"ok"'}