Skip to content

Add Maho environment support - #941

Open
fballiano wants to merge 1 commit into
wardenenv:mainfrom
fballiano:add-maho-environment
Open

Add Maho environment support#941
fballiano wants to merge 1 commit into
wardenenv:mainfrom
fballiano:add-maho-environment

Conversation

@fballiano

@fballiano fballiano commented Jul 20, 2026

Copy link
Copy Markdown

Check List

Is your feature request related to a problem? Please describe.
Maho is an open source ecommerce platform forked from OpenMage / Magento 1 and modernized (PHP 8.3+, no Zend/Varien, Symfony components). I am its maintainer. Warden has no environment type that fits it: the magento1 type assumes the webroot is the project root and pulls Magento-specific php-fpm image variants plus Redis, while Maho serves from public/, uses the generic php-fpm images, and deliberately needs no Redis, Varnish, Elasticsearch or OpenSearch (caching via Symfony Cache, sessions on files/db, catalog search on database fulltext; its composer.json even conflicts with the Magento Redis packages).

Describe the solution you've submitted
A new maho environment type following the same file layout as the cakephp type (added in #785):

  • maho.base.yml: NGINX_PUBLIC=/public, NGINX_TEMPLATE=maho.conf, and MAGE_IS_DEVELOPER_MODE=1 on php-fpm/php-debug (Maho honors this env var, inherited from Magento 1)
  • init.env: PHP 8.5, Composer 2, Node 24, MariaDB 12.2 (the newest published wardenenv images), WARDEN_DB=1 and everything else (redis, varnish, elasticsearch, opensearch, rabbitmq) off
  • db.base.yml: maho database/user/password defaults with the usual mysqld flags
  • maho.darwin.yml + maho.mutagen.yml: same appdata/Mutagen scheme as cakephp, with Maho's var/ directory (cache, logs, sessions, locks) excluded from sync
  • commands/env-init.help: added a maho stanza
  • CHANGELOG.md entry

No changes to commands/env.cmd are needed: type discovery is directory-driven and the ^magento php-image-variant regex correctly does not match maho, so the generic wardenenv/php-fpm images are used.

Requires the nginx template added in wardenenv/images#122.

Describe alternatives you've considered
Reusing the magento1 type: wrong webroot (project root instead of public/), Magento-specific php-fpm image variants that Maho does not need, and Redis enabled by default which conflicts with Maho's composer setup.

Additional context
Verification done so far:

  • type discovery: fetchValidEnvTypes from this checkout's utils/env.sh now returns ... magento2 maho shopware ... (discovery is directory-driven, so no shell changes were needed)
  • all five yml files parse as valid YAML
  • the nginx template from Add nginx configuration for Maho environment type images#122 was mounted into the published wardenenv/nginx:1.27 image with NGINX_TEMPLATE=maho.conf and NGINX_PUBLIC=/public, the image's envsubst step was run and nginx -t passes

Until the images PR is merged and the nginx image republished, the type can be tested end to end by bind-mounting maho.conf over /etc/nginx/available.d/maho.conf through a project's .warden/warden-env.yml.

@fballiano
fballiano force-pushed the add-maho-environment branch from 15a5ad7 to 7385e53 Compare July 20, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant