devmode

package
v1.131.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DevComposeFile     = "docker-compose.dev.yml"
	CodeDir            = "mediawiki-code"
	VSCodeDir          = ".vscode"
	PHPStormDir        = ".idea"
	PHPStormRunConfDir = ".idea/runConfigurations"
)

Variables

This section is empty.

Functions

func BuildXdebugImage

func BuildXdebugImage(installPath string, orch orchestrators.Orchestrator) error

BuildXdebugImage builds the xdebug-enabled image. Dev mode requires Docker Compose for Build and GetDevFiles.

func CreateDevModeFiles

func CreateDevModeFiles(installPath string) error

CreateDevModeFiles creates all the xdebug-related files in the installation directory

func DisableDevMode

func DisableDevMode(installPath string) error

DisableDevMode disables dev mode on an installation This reverses the symlinks created by EnableDevMode, restoring extensions/ and skins/ as real directories with their contents copied from mediawiki-code/

func EnableDevMode

func EnableDevMode(installPath string, orch orchestrators.Orchestrator, baseImage string) error

EnableDevMode enables dev mode on an existing installation If dev mode files exist but symlinks need to be restored, it handles that baseImage is the full Canasta image name (e.g., "ghcr.io/canastawiki/canasta:latest" or "canasta:local")

func ExtractMediaWikiCode

func ExtractMediaWikiCode(installPath, baseImage string) error

ExtractMediaWikiCode extracts code from the web container for live editing Uses raw docker commands (not docker compose) to avoid bind mount validation issues If the code directory already exists with content, it skips extraction and returns true baseImage is the full image name (e.g., "ghcr.io/canastawiki/canasta:latest" or "canasta:local")

func IsDevModeSetup

func IsDevModeSetup(installPath string) bool

IsDevModeSetup checks if dev mode files exist in the installation

func SetupDevEnvironment

func SetupDevEnvironment(installPath, baseImage string) error

SetupDevEnvironment configures .env and creates IDE configs (VSCode and PHPStorm) baseImage is the full image name (e.g., "ghcr.io/canastawiki/canasta:latest" or "canasta:local")

func SetupFullDevMode

func SetupFullDevMode(installPath string, orch orchestrators.Orchestrator, baseImage string) error

SetupFullDevMode performs the complete dev mode setup: 1. Extract code from container (must happen before creating docker-compose.dev.yml) 2. Create dev mode files (Dockerfile.xdebug, docker-compose.dev.yml, xdebug.ini) 3. Setup environment (.env, VSCode config) 4. Build xdebug image baseImage is the full Canasta image name (e.g., "ghcr.io/canastawiki/canasta:latest" or "canasta:local")

Types

This section is empty.

Jump to

Keyboard shortcuts

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