Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: expose the version as an environment variable in the context #39

Merged
merged 15 commits into from
May 13, 2019

Conversation

varl
Copy link
Contributor

@varl varl commented May 9, 2019

Relates to: https://github.com/amcgee/dhis2-backend/pull/2

No longer coupled to the dhis2-backend PR.

@varl varl requested a review from amcgee May 9, 2019 07:31
@amcgee
Copy link
Member

amcgee commented May 9, 2019

Very cool that this enables support for multiple instances behind a gateway! See my comment on the companion pr for concerns about tight coupling.

One question which may be important - do we want to support arbitrary context paths per cluster, or would it be sufficient to support a singular "cluster" gateway which proxies to multiple "versioned and named" clusters behind it. I.E.

d2 cluster config --port 8080
d2 cluster add --version dev --name mydevinstance
d2 cluster add --version 2.32 --name latest

(or something better with nicer commands)

Could result in a single gateway pointing at multiple clusters behind-the-scenes, so you could access localhost:8080/mydevinstance and localhost:8080/latest. This is a little less flexible but a little more controlled than allowing arbitrary context specification.

@varl
Copy link
Contributor Author

varl commented May 9, 2019

Could you take another look at this as well as https://github.com/amcgee/dhis2-backend/pull/2#issuecomment-490872497? They should be less coupled.

@varl
Copy link
Contributor Author

varl commented May 9, 2019

One question which may be important - do we want to support arbitrary context paths per cluster, or would it be sufficient to support a singular "cluster" gateway which proxies to multiple "versioned and named" clusters behind it. I.E.

I'm not exactly sure how this would work in practice, for example, I would still have to put an nginx reverse proxy in front of that "singular gateway" in order to serve the other sites I have on the same server.

But maybe --name is better than --context, as a different docker-compose repo might want to use the name environment for something else.

@varl varl changed the title feat: add a context parameter which allows the deployment context to be customized feat: add a name parameter which allows the deployment context to be customized May 9, 2019
@varl varl changed the title feat: add a name parameter which allows the deployment context to be customized fix: expose the version as an envrionment variable in the context May 13, 2019
@varl varl changed the title fix: expose the version as an envrionment variable in the context fix: expose the version as an environment variable in the context May 13, 2019
@varl varl mentioned this pull request May 13, 2019
@varl
Copy link
Contributor Author

varl commented May 13, 2019

I pulled out the single port cluster discussion to a separate issue.

@varl
Copy link
Contributor Author

varl commented May 13, 2019

This only exposes the version as an environment property now.

Copy link
Member

@amcgee amcgee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@amcgee amcgee merged commit 7e8e8dd into master May 13, 2019
@amcgee amcgee deleted the add-context branch May 13, 2019 11:30
dhis2-bot pushed a commit that referenced this pull request May 13, 2019
## [1.0.3](v1.0.2...v1.0.3) (2019-05-13)

### Bug Fixes

* **cluster:** expose the version as an environment variable in the context ([#39](#39)) ([7e8e8dd](7e8e8dd))
@dhis2-bot
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants