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

Swarm Docs - How to use a FQDN #744

Closed
programster opened this issue Oct 18, 2016 · 4 comments
Closed

Swarm Docs - How to use a FQDN #744

programster opened this issue Oct 18, 2016 · 4 comments

Comments

@programster
Copy link

programster commented Oct 18, 2016

I managed to follow and get working the rc2 docs for running in a docker swarm cluster, after figuring out that while we are in release I need to pull/use traefik:v1.1.0-rc1 instead of just traefik because traefik:v1.1.0-rc2 doesn't seem to exist yet.

However, I can't figure out how to get this working with a FQDN such as my-site.programster.org. The docs simply show testing with curl -H Host:whoami0.traefik http://$(docker-machine ip worker1). I make sure to update my /etc/hosts file to point my-site.programster.org to any of the swarm nodes, but I just get a 404 page not found message.

Is this a simple configuration change, such as changing:

docker service create \
    --name whoami0 \
    --label traefik.port=80 \
    --network traefik-net \
    emilevauge/whoami

...which could be clarified in an update to the docs or is it just not possible? I tried changing --name and --label values with no success.

@SvenAbels
Copy link

Try this:

docker service create \
    --name whoami0 \
    --label traefik.port=80 \
    --network traefik-net \
    --label traefik.frontend.rule=Host:my-site.programster.org \
    emilevauge/whoami

@programster
Copy link
Author

Brilliant! I just tested it and that's exactly what I needed!

@emilevauge
Copy link
Member

If your issue is solved, can you close it? Thanks @programster :)

@programster
Copy link
Author

I'm closing this thread, but I do suggest the documentation is updated to include this example because I won't be the only one. Thanks for the help.

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants