-
Notifications
You must be signed in to change notification settings - Fork 0
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 ports exposed in docker compose configurable #113
Conversation
We use a lot of the same services between Antenna, Eliot, Socorro, and Tecken. I can't remember if I did a good job of making them consistent. If they're not consistent, we should fix that--but we could do that in the future. |
and make exposed ports configurable
1e7f3fb
to
0d7a59f
Compare
@@ -17,7 +17,7 @@ services: | |||
extends: | |||
service: base | |||
ports: | |||
- "8000:8000" | |||
- "${EXPOSE_ELIOT_PORT:-8000}:8000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you set this in .env
, then make run
doesn't really work. Is it possible to set this in .env
for the local dev environment, but not the devcontainer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then
make run
doesn't really work
how so? it still runs eliot, just exposed on a different port
Co-authored-by: Will Kahn-Greene <willkg@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we add the .devcontainer
stuff, we should adjust the stop
rule in the Makefile
to something like:
.PHONY: stop
stop: .env ## | Stop docker containers.
${DC} -f docker-compose.yml -f .devcontainer/docker-compose.yml stop
We might also want to write up a page in Confluence covering using VSCode with all the crash ingestion services.
This looks good!
We could put the configuration for the dev container in the main |
docker-compose is exposing ports on the host that I believe are only needed internally within the docker-compose network.This caused me issues with trying to use a vscode devcontainer, as seen in mozilla-services/tecken#2857, because both projects expose these ports, and the environments are not automatically shut down when vscode is closed: https://github.com/mozilla-services/tecken/pull/2857/files#diff-24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686R10It would make sense to also do this in tecken, but that exposes more ports that I am less sure are unnecessarysee also mozilla-services/tecken#2858
per https://github.com/mozilla-services/tecken/pull/2857/files#r1430382049
with devcontainer and its docker-compose dependencies running even when vscode isn't open, ports conflict between tecken, eliot, and socorro, so this PR makes the exposed ports configurable via environment variables, which can be set in .env in each project to avoid overlap.