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

Make all service locations configurable #675

Open
lognaturel opened this issue Jun 24, 2024 · 1 comment
Open

Make all service locations configurable #675

lognaturel opened this issue Jun 24, 2024 · 1 comment
Labels
needs discussion Discussion needed before work can begin ops Docker, ops to deploy Central

Comments

@lognaturel
Copy link
Member

lognaturel commented Jun 24, 2024

As proposed by @tobiasmcnulty at #546

This would mean adding env vars for:

  • Backend location, the nginx config currently hardcodes it to http://service:8383
  • Enketo location, the nginx and backend configs currently hardcode it to http://enketo:8005 and http://enketo:8005/-; the Enketo config currently hardcodes a subpath of -. I believe Central itself knows about and uses the - suffix.
  • Pyxform location, the service config currently hardcodes it to a host of pyxform and a port of 80
  • Enketo redis dbs, the Enketo config currently hardcodes the main db to enketo_redis_main with port of 6379 and the cache db to enketo_redis_cache with port of 6380. If we were to make this one configurable from .env, we should set the url for each db which is more flexible than setting host and port (see docs).

Currently uses who want this level of configurability need to use their own way of editing the relevant config files.

So far, we've kept configurability to a minimum and treated the Docker Compose file as the preferred way of running. A the same time, we know some users prefer to orchestrate services themselves.

From @matthew-white: these get configured differently for local dev as well (e.g. 127.0.0.1) so there's a benefit for that context as well.

CC @spwoodcock

@lognaturel lognaturel added the needs discussion Discussion needed before work can begin label Jun 24, 2024
@lognaturel lognaturel changed the title Make all service run locations configurable Make all service locations configurable Jun 24, 2024
@lognaturel lognaturel added the ops Docker, ops to deploy Central label Jun 25, 2024
@tobiasmcnulty
Copy link

From my perspective, adding these variables makes all the service interdependencies configurable (and therefore the pre-built images generally more usable), without adding materially to the size of docker-compose.yml (9 lines added to a 151 line file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Discussion needed before work can begin ops Docker, ops to deploy Central
Projects
None yet
Development

No branches or pull requests

2 participants