empire icon indicating copy to clipboard operation
empire copied to clipboard

Ability to set "exposure" by process

Open iserko opened this issue 8 years ago • 3 comments

Currently "exposure" as it is phrased in the code is controlled by running:

  • emp domain-add <domain> which makes ELB/ALB internet-facing
  • emp domain-remove <domain> which makes ELB/ALB internal (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"  

iserko avatar May 03 '17 21:05 iserko

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 avatar May 03 '17 22:05 ejholmes

@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?

iserko avatar May 03 '17 22:05 iserko

Not that it's an issue, just needs to be considered. I think ^ is the right way to approach it.

ejholmes avatar May 03 '17 22:05 ejholmes