Skip to content

Add multi_store YAML option to conditionally omit $MAGE_RUN_CODE / $MAGE_RUN_TYPE from Nginx config #107

@LouisdeLooze

Description

@LouisdeLooze

Currently, MageBox always injects $MAGE_RUN_CODE and $MAGE_RUN_TYPE into the generated Nginx configuration. For projects that are not using a multi-store setup and where default is not used as the store code, this results in Magento attempting to resolve a store by code even when it should be falling back to its default resolution logic.

Possible Solution
A per-project YAML option (e.g. multi_store) should control whether $MAGE_RUN_CODE and $MAGE_RUN_TYPE are injected into the Nginx config templates:

# .magebox.yaml
multi_store: false  # omits $MAGE_RUN_CODE and $MAGE_RUN_TYPE from Nginx config

When multi_store: false (or when the key is absent, defaulting to false), the generated Nginx config should omit these directives entirely. When multi_store: true, the current behaviour is preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions