Contexture icon indicating copy to clipboard operation
Contexture copied to clipboard

Add the option to limit nesting depth of Domain/Sub-domains

Open Nagelfar opened this issue 5 years ago • 2 comments

In the current version of Contexture it is possible to nest Domain/Sub-Domains without any restriction. But for a lot of systems it's enough to have domains and sub-domains as the only way to structure their bounded contexts.

To reduce complexity for the users either

  1. limit the nesting depth to domains/sub-domains
  2. introduce a configuration to limit nesting depth to a certain level (e.g. 2 levels - domains/sub-domain/sub-domain)

Option 1) will be easier to implement, document and maintain. But it could limit the usefulness of Contexture for some users.

Nagelfar avatar Sep 30 '20 15:09 Nagelfar

Hi! :wave:

It looks like, that option 2 is implemented, but I can't change the default configuration. I think, limiting the nesting depth is a good idea, but the default value of 1 is quite low. Therefore, I tried to change it to 2, but the changed configuration value is not recognized by contexture.

  • I first set an environment variable in docker container. This is not recognized.
  • I then mounted an env file at /app/.env, /app/wwwroot/.env and /app/wwwroot/assets/.env but the new configuration value is not recognized at all.

Content of my env file:

VITE_CONTEXTURE_MAX_SUBDOMAINS_NESTING_LEVEL=2 VUE_CONTEXTURE_MAX_SUBDOMAINS_NESTING_LEVEL=2 CONTEXTURE_MAX_SUBDOMAINS_NESTING_LEVEL=2

(I made the different prefixes to be sure, that I'm not missing something)

indika-dev avatar Jun 20 '24 11:06 indika-dev

Hi @indika-dev

I believe that variables defined in .env are build time dependencies used by vite. As it is right now you'd probably need to build docker image yourself.

Also note that this nesting limit is only implemented by the fronted pull/138 - it's not enforced by the backend in any way

K-Dud avatar Jul 09 '24 09:07 K-Dud