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

Custom SSL Certificate #85

Open
cristianbauza opened this issue Feb 4, 2022 · 2 comments
Open

Custom SSL Certificate #85

cristianbauza opened this issue Feb 4, 2022 · 2 comments

Comments

@cristianbauza
Copy link

It would be very useful to have a chapter that explains how to configure a custom wildcard type certificate. Tanks.

@tiangolo
Copy link
Owner

Thanks for the patience!

I should let you know, I had to deprecate this website and ideas, I would no longer recommend Docker Swarm Mode for new projects: https://dockerswarm.rocks/swarm-or-kubernetes/ 🥲

@plum-stamp
Copy link

My solution for custom wildcard certificates was to mount two volumes in the traefik container, one to read a dynamic configuration file and one to read the certificates stored locally:

command:
  - --providers.file.directory=/etc/traefik/
  - --providers.file.watch=true

volumes:
  - "./config/dynamic.yml:/etc/traefik/dynamic.yml:ro"
  - "./certs:/etc/certs:ro"

Dynamic.yml

tls:
  certificates:
    - certFile: "/etc/certs/local-cert.pem"
      keyFile: "/etc/certs/local-key.pem"

If there's issues with deploying the custom certificates, check the docker logs for the traefik container, as traefik will fallback to the default (inbuilt) certificates if there's a problem.

@github-actions github-actions bot removed the answered label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants