How enable port based multi sites in dev environment?

how can I enable port based multi sites in dev environment? it’s a docker installation on my laptop, any pointers?

I tried bench set-nginx-port site2name 82,
but only the first site that installed always starts, other other site seems not able to acces.

Look to some help here. Thanks!

No port based multi sites in dev environment.

All sites on dev bench will be served on port 8000.
there is site name based multitenency in dev bench.

for sitename based multi sites, edit common_site_config.json and set “serve_default_site” to false. Remove sites/currentsite.txt.
Stop and start bench to start serving multiple sites on same port.

Nginx does the port based multi tenancy in production. Nginx does not exist in development.

3 Likes

@revant_one : Is the parameter “serve_default_site” still relevant in version 12?
I searched for any Python code that references this key. But found nothing.

Try without the parameter? It works? No need of setting it then.

By default it gets generated with common_site_config.json?

Edit: there is some reference to the key serve_default_site in bench repo.

Yes, Bench is definitely creating the entry. That happens for me too.

But then what? I cannot find any Frappe or ERPNext code that reads this value, and reacts to it?

That is the reason I don’t find it when using docker production images.
It gets generated when bench is used.

Hmmm. I guess I’ll edit my Bench code, so it stops adding that key-value pair. Then delete the entry in my common_site_config.json.

And then see what happens (if anything).