Documentation
¶
Index ¶
- Constants
- func BuildXdebugImage(installPath string, orch orchestrators.Orchestrator) error
- func CreateDevModeFiles(installPath string) error
- func DisableDevMode(installPath string) error
- func EnableDevMode(installPath string, orch orchestrators.Orchestrator, baseImage string) error
- func ExtractMediaWikiCode(installPath, baseImage string) error
- func IsDevModeSetup(installPath string) bool
- func SetupDevEnvironment(installPath, baseImage string) error
- func SetupFullDevMode(installPath string, orch orchestrators.Orchestrator, baseImage string) error
Constants ¶
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 ¶
CreateDevModeFiles creates all the xdebug-related files in the installation directory
func DisableDevMode ¶
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 ¶
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 ¶
IsDevModeSetup checks if dev mode files exist in the installation
func SetupDevEnvironment ¶
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.