Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
Script Runtime Model
Initializing search
    bf-dev
    • Home
    • Product Capabilities
    • Process
    • Current Work
    • System Design
    • Software Reference
    • Operations
    bf-dev
    • Home
      • Overview
      • Manage
      • Overview
      • Product Engineering Workflow
      • Product Engineering Delivery
      • Product Engineering Workflow in Linear
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
      • Templates
      • Publishing
      • Workflow Companions
      • Overview
      • Active Artifacts
      • Backlog Artifacts
      • Archived Artifacts
      • Overview
      • Microgrid
      • OSCP
        • Challenge
        • Specification
        • Spec
        • Architecture
        • Overview
        • Script Runtime Model
          • ./init Flow
          • ./up Flow
          • Behavior Notes
        • Compose Profiles and Modes
        • Repo Topology
        • CI and Release Integration
        • Overview
        • Internal Application Diagrams
          • Overview
          • Web Model
          • Core Model
        • Service Interaction Flows
        • Data and State
          • Index
          • bf-manage-web
          • bf-manage-core
          • bf-manage-connect
          • bf-manage-sitepwrmon
          • bf-manage-incidents
          • bf-telematics
          • bf-depot-sim
          • bf-manage-roaming
          • bf-support-microsite
          • bf-digital-twin
          • bf-schedule-creator
        • Overview
        • Internal Application Diagrams
        • Migration and Flags
        • Simulation Request Lifecycle
          • Index
          • bf-bnl-ui
          • bf-bnl-settings
          • bf-bnl-schedule-analysis-compute
          • bf-route-modelling
          • bf-schedule-creator
          • bf-digital-twin
        • Overview
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • ADRs
        • Service Matrix
        • Cloud Dependencies
        • Ports and URLs
      • Onboarding
      • Daily Operations Runbook
        • Overview
        • Staging Hotfix Release
        • Production Hotfix Release
        • Terraform Plan Dry Runs
      • Troubleshooting
      • Testing Guide
    • ./init Flow
    • ./up Flow
    • Behavior Notes

    Script Runtime Model¶

    ./init Flow¶

    sequenceDiagram
      participant Dev as Developer
      participant Init as Init Script
      participant OP as 1Password CLI
      participant GL as GitLab API
      participant Git as git clone
    
      Dev->>Init: run init script
      Init->>OP: op signin
      Init->>OP: inject env templates
      Init->>GL: validate GITLAB_PASSWORD token
      Init->>Git: clone each projects.txt repo if missing
      Init->>OP: inject service env templates
      Init-->>Dev: done

    ./up Flow¶

    flowchart TD
      Start[Up script] --> Parse[Parse mode arguments]
      Parse --> CheckEnv{Root env exists}
      CheckEnv -- No --> Init[Run init script]
      CheckEnv -- Yes --> CheckRepos{All repos cloned}
      CheckRepos -- No --> Init
      CheckRepos -- Yes --> Stop[Stop running containers]
      Stop --> BuildSvc[Resolve profile service set]
      BuildSvc --> Up[Compose watch up]
      Up --> Down[Compose down after exit]

    Behavior Notes¶

    • Manage fallback service: welcome
    • Plan fallback: full plan service list if profile has no plan services
    • Existing containers are stopped before startup to avoid stale state conflicts
    Made with Material for MkDocs