-
Notifications
You must be signed in to change notification settings - Fork 1
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
Config (Traefik): Configure a Traefik reverse proxy Docker container to use muscle.local and backend.muscle.local domains #717
Conversation
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.
Nice! Perhaps just "muscle" (instead of "muscle.local") might even do? Just for my understanding: where does the actual mapping of the routes to the relevant localhost ports happen? Is it in the add-hosts-entries script? I worry that the port mappings are not explicit now, so it might be a bit hocus-pocus to future developers.
That happens in the Traefik container (see the
The only thing I'm still thinking about is how to execute the |
2e6ce73
to
a394239
Compare
Perhaps add some comments to the docker-compose then to explain what the |
…muscle.local & backend.muscle.local)
…ackend.muscle.local) to the hosts file
a394239
to
2b0995d
Compare
…d backend the docker compose configuration file
I don't think the port mappings are that important. Traefik communicates with Docker and simply proxies to that specific Docker service. What might be interesting to check is to start up the newly added Traefik container (I just merged the PR) and navigate to Also, I've added some explanation to the Wiki of how to start up the Development environment: https://github.com/Amsterdam-Music-Lab/MUSCLE/wiki/2.-Start-the-application |
Not sure if we want this, but during yesterday's demo session I heard some people talking about not remembering the urls and port numbers to use for the application and the backend. This PR adds a Traefik container that reroutes
http://localhost:3000
andhttp://localhost:8000
tohttp://muscle.local
andhttp://backend.muscle.local
, which is easier to remember (and of course you can also just typemuscle.local
andbackend.muscle.local
).Additionally, it adds a idempotent script (
./scripts/add-hosts-entries
) to add the hostnames to the hostfile in/etc/hosts
file, which is required Traefik to work.