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

Add a docker-compose & let's encrypt user-guide #5121

Merged
merged 6 commits into from Aug 6, 2019
Merged

Add a docker-compose & let's encrypt user-guide #5121

merged 6 commits into from Aug 6, 2019

Conversation

pbenefice
Copy link
Contributor

@pbenefice pbenefice commented Jul 18, 2019

What does this PR do?

Addind a User Guide to the existing documentation giving an example with docker-compose and let's encrypt behind a basic auth

Motivation

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

I wanted to know if you could be interested in this ?
If yes, feel free to give me feedback =) (I did it quite quickly)

Thanks.

@ldez ldez changed the title doc(mkdocs): add a docker-compose & let's encrypt user-guide Add a docker-compose & let's encrypt user-guide Jul 18, 2019
@ldez

This comment has been minimized.

@pbenefice

This comment has been minimized.

@pbenefice pbenefice changed the base branch from master to v2.0 July 18, 2019 20:00
@pbenefice

This comment has been minimized.

@ldez

This comment has been minimized.

@pbenefice

This comment has been minimized.

@ldez ldez added this to To review in v2 via automation Jul 19, 2019
Copy link
Collaborator

@SantoDE SantoDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good job. Thanks!

@ldez ldez self-requested a review July 19, 2019 08:39
@ldez ldez requested a review from SantoDE July 20, 2019 01:22
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your time.

It's a little bit too raw:

  • The purpose of the guide is to explain LE with Docker so the use of the provider File does not seem appropriate.
  • the guide is not sync with the beta version
  • some points are a little ambiguous

I would prefer a simpler user guide based on something like this:

version: "3.3"

services:

  traefik:
    image: "traefik:v2.0.0-beta1"
    command:
      - --entrypoints.web.address=:80
      - --entrypoints.websecure.address=:443
      - --api.dashboard=true
      - --providers.docker=true
      - --global.sendAnonymousUsage=true
      - --certificatesresolvers.basic.acme.email=postmaster@mydomain.com
      - --certificatesresolvers.basic.acme.storage=/acme.json
      - --certificatesresolvers.basic.acme.tlsChallenge
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    labels:
      - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
      - "traefik.http.routers.http-catchall.entrypoints=web"
      - "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
    volumes:
      - "./acme.json:/acme.json"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  whoami:
    image: containous/whoami
    labels:
      - "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
      - "traefik.http.routers.whoami.entrypoints=websecure"
      - "traefik.http.routers.whoami.tls.certresolver=basic"

@pbenefice
Copy link
Contributor Author

Thanks for your review, I'll try to revamp this during the weekend.

@lifeofguenter

This comment has been minimized.

@pbenefice
Copy link
Contributor Author

pbenefice commented Jul 21, 2019

@ldez Hi again =)
I rewrote the guide focusing more on let's encrypt. What do you think ?
cc @SantoDE

Thanks.

Edit : I have the following error in the travis-ci, but make docs-clean docs-verify was ok locally

=== Checking HTML content...
- /app/site/contributing/maintainers/index.html
  *  External link https://github.com/vdemeester failed: 502 No error
make[1]: *** [docs-verify] Error 123
make[1]: Leaving directory `/home/travis/build/containous/traefik/docs'
make: *** [docs] Error 2
The command "if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then make docs; fi" exited with 2.

Copy link
Collaborator

@SantoDE SantoDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pbenefice,

thanks once again.

I did reread your guide and I'm a bit cocerned about the DNS Challenge section, as the variables to set and stuff differ per DNS provider.

Maybe we could replace this with the TLS Challenge? WDYT?

@pbenefice
Copy link
Contributor Author

pbenefice commented Jul 24, 2019

Hi @SantoDE, thanks for your feedback.

IMHO the DNS challenge is important. It is the only challenge allowing for wildcard cert generation and it does not require to be directly exposed to the internet.
And, it's my opinion, but I don't feel it would be too difficult to adapt to a different provider : you just need to change the variables (already well documented on the Treafik doc 😉).

I can add a section detailing the TLS challenge if you wish, but my opinion is that the DNS one has real advantages and should be introduced (which doesn't force users to adopt it).
But it's only my opinion. What do you think ?

Edit : I could also split the guide to add a docker-compose section, with a page for the http challenge, a page for dns, ... It might be less confusing and easier to read for user interested in specific challenges, WDTY ?

@SantoDE
Copy link
Collaborator

SantoDE commented Jul 29, 2019

Hey @pbenefice,

I agree. That would be a nice idea :) And yeah, maybe we make it clear that the DNS stuff changes per provider (values).

I also think detailing TLS might be a good idea :)

@pbenefice pbenefice closed this Jul 30, 2019
@pbenefice
Copy link
Contributor Author

Well, I did something wrong with git, and lost all the work ^^

@pbenefice pbenefice reopened this Jul 30, 2019
@pbenefice
Copy link
Contributor Author

Thanks reflog, I managed to get my work back. I'm definitly not familiar with upstreams ^^
Anyway, I added a basic example with docker-compose that I use as a starting point to detail each 3 let's encrypt challenges in their own page.

@SantoDE WDTY ?

@ldez ldez requested a review from SantoDE July 30, 2019 17:37
Copy link
Collaborator

@SantoDE SantoDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for all you hard work! LGTM to me 👼

ping @dduportal

@SantoDE SantoDE requested a review from dduportal July 31, 2019 13:58
@ldez ldez added the kind/enhancement a new or improved feature. label Aug 1, 2019
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
:shipit:

@traefiker traefiker merged commit 63a07fe into traefik:v2.0 Aug 6, 2019
v2 automation moved this from To review to Done Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants