Ability to set "exposure" by process
Currently "exposure" as it is phrased in the code is controlled by running:
emp domain-add <domain>which makes ELB/ALBinternet-facingemp domain-remove <domain>which makes ELB/ALBinternal(or if you never use domain-add for an app
That setting is applied across the whole application and has no ability to set it per web process.
What I would like to see is to be able to control it via the Procfile using EMPIRE_X_EXPOSURE if it existed:
# internal
qint:
command: ./bin/web
ports:
- "80:8080"
environment:
EMPIRE_X_LOAD_BALANCER_TYPE: "alb"
EMPIRE_X_EXPOSURE: "internal"
# external
qext:
command: ./bin/web
ports:
- "80:8080"
environment:
EMPIRE_X_LOAD_BALANCER_TYPE: "alb"
EMPIRE_X_EXPOSURE: "internet-facing"
Yeah, I've hit this before as well. The domain-* stuff was always meant to be pulled out before a 1.0 release, since it's mostly cruft leftover from the first version. Per-process exposure in the Procfile like this makes a lot more sense, the only complication is with pulling it out is backwards compat.
@ejholmes well I would say that if you have EMPIRE_X_EXPOSURE set ... that would take priority ... then you just deprecate domains-add ... the only reason why we ever even use domains-add is to make the ELB/ALB public.
In what way is backwards compatibility an issue?
Not that it's an issue, just needs to be considered. I think ^ is the right way to approach it.