-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow selection of BE through env var #115
Conversation
Just wondering how does it compare to the solution with profiles? I liked the idea of using them but I'm unsure they offer the same features |
Is there a need for both BE's to run at the same time? |
I don't think so |
I think the differences are:
I don't think we need both bes at the same time, but rather the 2 envs potentially, which could be covered by my example above I think we will use profiles in the future, probably to bundle envs together, e.g. the one with the zip-service, the one without, but I think here we are in a slightly different use cases as we want to have different configurations (profiles) basing them on different BEs, so choosing the profile and the be it uses should be set by two different flags. So, in general, I reckon useful to be able to select the BE, only allow one, and call the service backend, no matter the flavour (so that other services don't really care what flavour it is). Schematically:
|
it will be closed by relative atomic PRs |
closed by related PRs |
I started to have a look at this #107 and I think the PR here could work well.
It is split into commits to ease the review, I will open dedicated PRs if this looks ok.
The idea is to enable only one backend at a time, which can be configured through an ENV var. Then the other containers will connect to it without noticing the change (also the code does not require much change).
This relies on an include rule which depends on the ENV provided and on the fact that both be_next and be expose a container named
backend
, which the others connect to. This might also simplify in the future the connection to thearchivemock
I still have to update the README (both the global and the backend one) and the CI
The drawback of this is that it does not support running both BEs at the same time, but this can be circumvented (I think) in a later PR by making the traefik port custom and setting the docker compose
project-name
. In this way, one can run:which will run the services with the old BE
and then run, e.g.
which will run the services with the new BE and expose them on port 81, ultimately creating 2 envs with all the services, one relying on the new BE and on port 81, another relying on the old BE and on port 80.