18F / knowledge-sharing-toolkit

[EXPERIMENTAL] Docker components for the knowledge sharing toolkit
https://docs.google.com/document/d/19Q2t5zHzVKAv4ncftrzvKIqE0QVDWb1Nq_jQep69mTw/edit
Other
0 stars 7 forks source link

Templatize the URLs #16

Open afeld opened 8 years ago

afeld commented 8 years ago

Currently, the URLs for each service is hard-coded into the nginx config files, etc. This is a problem for deploying to multiple environments (as seen in #15), but this would be an obstacle for anyone trying to deploy in a different agency.

mbland commented 8 years ago

You're talking about the names of the other services that comprise the toolkit, correct? i.e. authdelegate, hmacproxy, oauth2_proxy, etc.? At the moment, all the services are presumed to run on the same host. In the Dockerized version, those URL names are assigned by the Docker network to match the names of the containers. In the non-Dockerized version, I added those names to /etc/hosts to the same line as localhost. (Yes, I need to document this. :smiley:)

If there's a way to assign those to some sort of variables that are defined in a centralized place, I'm happy to try that, but I just hadn't the chance to look into solving that problem yet.

afeld commented 8 years ago

What I'm saying is that to deploy to a staging environment, #15 was needed to change those hostnames in a bunch of different places. We should get those hard-coded hostnames out of the files, or at least in one central place, so that we can deploy to "production", staging, you at USCIS, etc. without needing to maintain separate branches for each. Does that make sense?

mbland commented 8 years ago

Yeah. Only question is how, is what I'm saying.

afeld commented 8 years ago

Hey man, I'm here to find problems, not solutions :wink: