Skip to content

Add dev mode to CLI#140

Merged
yaronkoren merged 13 commits intomainfrom
devmode
Jan 27, 2026
Merged

Add dev mode to CLI#140
yaronkoren merged 13 commits intomainfrom
devmode

Conversation

@cicalese
Copy link
Contributor

@cicalese cicalese commented Jan 19, 2026

This adds development mode support for Canasta installations, enabling
live code editing and step debugging with Xdebug.

Dev Mode Features

New flags for canasta create:

  • --dev (-D): Enable development mode with Xdebug
  • --dev-tag: Specify Canasta image tag (default: latest)
  • --build-from: Build from local source repositories

New flags for canasta start and canasta restart:

  • --dev (-D): Enable/start in development mode
  • --no-dev: Disable development mode

When dev mode is enabled:

  • MediaWiki code is extracted to mediawiki-code/ for live editing
  • Xdebug-enabled Docker image is built
  • IDE configuration files are generated (.vscode/launch.json, .idea/)

Local Source Building (--build-from)

The --build-from flag enables building from local repositories:

  • Canasta/ (required) - fails if not found
  • CanastaBase/ (optional) - uses published image if not found
  • Canasta-DockerCompose/ (optional) - clones from GitHub if not found

Sets CANASTA_IMAGE in .env to use locally built images.

Note: --dev-tag and --build-from are mutually exclusive.

Other Changes

  • Add devmode package for dev mode setup and management
  • Add imagebuild package for building images from source
  • Add image constants to canasta package (GetDefaultImage, GetImageWithTag)
  • Fix SaveEnvVariable to add new keys, not just update existing
  • Update CloneStackRepo to support local Canasta-DockerCompose
  • Track dev mode state in installation config

Related PRs:

@cicalese cicalese marked this pull request as ready for review January 23, 2026 16:44
@cicalese cicalese requested a review from yaronkoren January 23, 2026 16:50
Enable building Canasta installations from local source code for
development and testing. When --build-from is specified:

- Build CanastaBase from local source (if directory exists)
- Build Canasta from local source
- Copy Canasta-DockerCompose from local source (if directory exists)
- Set CANASTA_IMAGE in .env to use the locally built image

Additional changes:
- Separate --dev (boolean) from --dev-tag (image tag specification)
- Fix SaveEnvVariable to add new keys, not just update existing ones
- --dev-tag and --build-from are mutually exclusive
@yaronkoren yaronkoren requested a review from jeffw16 January 26, 2026 20:54
@yaronkoren yaronkoren merged commit fa0b4d5 into main Jan 27, 2026
@yaronkoren yaronkoren deleted the devmode branch January 27, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants