Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple environment ? #14

Open
sveetch opened this issue May 18, 2023 · 1 comment
Open

Multiple environment ? #14

sveetch opened this issue May 18, 2023 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@sveetch
Copy link
Owner

sveetch commented May 18, 2023

It could be nice to have a feature to manage multiple compose environment.

As the environment settings is commonly done, the main compose config would be the default base and possible additional environment would inherit from it and override necessary var.

Still need to find how to manage it well from compose manifest in YAML file, how everything could adopt this feature and if it is not wrong idea that could lead to messy things.

@sveetch sveetch added enhancement New feature or request question Further information is requested labels May 18, 2023
@sveetch
Copy link
Owner Author

sveetch commented May 24, 2024

This could be done with extra section for environment like:

[tool.project_composer.dev]
collection = [
    "debug_toolbar",
    "admin-tools",
]
syspaths = [
    ".",
    "./mystuff/",
]

[tool.project_composer.requirements.dev]
template = "requirements/base_dev_template.txt"

Where the target environment would be dev. Composer should first get the base sections then look ahead for the targetted environment in section and overrides the base variable with the extra ones from environment.

From composer cli, the target environment would be defined with argument --env dev . The API may need some additional non positionnal argument to target environment in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant