sitedoctor

package
v1.26.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package sitedoctor runs Laravel app-level health checks for a single site: APP_KEY, .env drift against .env.example, the APP_DEBUG-in-production footgun, the public/storage symlink, and pending migrations. The checks are pure (files plus one optional artisan exec) so both the web dashboard and the TUI can share one implementation rather than each carrying its own copy.

Index

Constants

View Source
const (
	StatusOK      = "ok"
	StatusWarn    = "warn"
	StatusFail    = "fail"
	StatusUnknown = "unknown"
)

Check statuses, mirroring the MCP doctor's check shape so the diagnostics read consistently. "unknown" covers a check lerd couldn't run (e.g. the app is down), which is distinct from a genuine pass or failure.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Detail string `json:"detail,omitempty"`
	Fix    string `json:"fix,omitempty"`
}

Check is one app-level health finding for a site. Fix, when set, names a command from the site's command set that a UI can run to resolve the finding, so the doctor never grows its own mutation endpoints.

type Response

type Response struct {
	Checks   []Check `json:"checks"`
	Failures int     `json:"failures"`
	Warnings int     `json:"warnings"`
}

Response is the full doctor report for a site.

func Run

func Run(ctx context.Context, path string) Response

Run builds the doctor report for the Laravel project at path. The cheap checks read files only; the migrations check is the one that touches the container. Checks that don't apply to a project (no .env.example, no public disk) are omitted rather than reported as passing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL