Repository navigation
Adds multistore parameter - #109
Open
LouisdeLooze wants to merge 2 commits into
Open
LouisdeLooze wants to merge 2 commits into
LouisdeLooze wants to merge 2 commits into
Conversation
Contributor
|
@Aquive is that PR related to magebox failing the code for multistore if the main store code is not |
Contributor
|
@jakwinkler this is not my PR. Its from @LouisdeLooze I haven't digged into this. |
Contributor
Author
|
I updated the PR to follow the idea mentioned: #107 (comment) |
jakwinkler
pushed a commit
that referenced
this pull request
Sep 28, 2026
Magento resolved a store by code even for single-store projects, because MageBox always injected MAGE_RUN_CODE and MAGE_RUN_TYPE. A host map now sets them only for domains that name a store code, which also supports store and website mode in one project and removes two optional settings. Closes #107
jakwinkler
added a commit
that referenced
this pull request
Sep 28, 2026
Follow-up to #109, which is otherwise ready. The map was written per project into the shared vhosts directory. nginx accepts one map per variable and includes every file in that directory into the same http block, so a second multistore project would have made it reject the whole configuration with `duplicate "MAGE_RUN_CODE" variable` and serve nothing at all. All projects now share one file, rebuilt from every project when any of them starts, and per-project files from an earlier build are removed. Hosts are matched exactly. With a leading dot in nginx's `hostnames` mode, a deliberately code-less admin.mystore.test inherited the code of mystore.test, which the PR's own test expected not to happen. mage_run_code and mage_run_type keep working with a deprecation warning. The loader ignores unknown keys, so renaming them outright would have let existing multistore projects lose their codes silently and serve the wrong store. A store_type other than store or website now fails validation instead of reaching Magento as a value it does not understand. Docs: the domain properties table, the --store-type flag, the FAQ answer that promised MAGE_RUN_CODE=default, and how the shared map works. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #107
This is a limited breaking change. The proposed default for multi_store is false, meaning $MAGE_RUN_CODE and $MAGE_RUN_TYPE will be omitted from Nginx config by default going forward. Users with existing multi-store projects will need to explicitly add multi_store: true to their project YAML to preserve the previous behaviour.