Is there a way of sharing Traefik-generated SSL with containers? #13

Closed
opened 2020-09-13 16:50:10 +00:00 by 3wordchant · 3 comments
Owner

CoTURN (for matrix-synapse) and SimpleSAML (for mediawiki) both want access to SSL certificates and keys - I could set up a separate LetsEncrypt container in both and do some elaborate routing dance to generate them, but I'm wondering if there's a way to make the Traefik-generated ones available to the containers? Tried some web searchin' but no dice so far.

CoTURN (for `matrix-synapse`) and SimpleSAML (for `mediawiki`) both want access to SSL certificates and keys - I could set up a separate LetsEncrypt container in both and do some elaborate routing dance to generate them, but I'm wondering if there's a way to make the Traefik-generated ones available to the containers? Tried some web searchin' but no dice so far.
Author
Owner

Turns out SimpleSAML just needs self-signed certs generated using openssl (and now included, possibly incorrectly, in the simplesaml custom entrypoint script).

For CoTURN, I managed to get some initial certificates for testing by installing certbot on the host, stopping Docker, running certbot certonly -d turn..., then restarting Docker. It looks like setting up a separate container to run acme-sh shouldn't be too annoying though: https://github.com/b-venter/Matrix-Docker-install#9-adding-a-standalone-acme-for-non-http-certificates

Turns out SimpleSAML just needs self-signed certs generated using `openssl` (and now [included, possibly incorrectly, in the `simplesaml` custom entrypoint script](https://git.autonomic.zone/compose-stacks/mediawiki/src/branch/simplesaml/entrypoint.simplesaml.sh.tmpl#L29)). For CoTURN, I managed to get some initial certificates for testing by installing `certbot` on the host, stopping Docker, running `certbot certonly -d turn...`, then restarting Docker. It looks like setting up a separate container to run `acme-sh` shouldn't be too annoying though: https://github.com/b-venter/Matrix-Docker-install#9-adding-a-standalone-acme-for-non-http-certificates
3wordchant added the
question
label 2020-09-24 23:14:23 +00:00
Author
Owner

https://github.com/ldez/traefik-certs-dumper

  certdumper:
    image: ldez/traefik-certs-dumper:v2.5.4
    command: "file --watch --domain-subdir=true --version v2"
    volumes:
      - /opt/docker.swarm/traefik/acme.json:/acme.json:ro
      - certs:/dump
    deploy:
      replicas: 1

.. and then I guess we can mount the certs volume into other services and give them access. Sweet!

Example from Mailcow: https://mailcow.github.io/mailcow-dockerized-docs/firststeps-rp/

https://github.com/ldez/traefik-certs-dumper ``` certdumper: image: ldez/traefik-certs-dumper:v2.5.4 command: "file --watch --domain-subdir=true --version v2" volumes: - /opt/docker.swarm/traefik/acme.json:/acme.json:ro - certs:/dump deploy: replicas: 1 ``` .. and then I guess we can mount the `certs` volume into other services and give them access. Sweet! Example from Mailcow: https://mailcow.github.io/mailcow-dockerized-docs/firststeps-rp/
Author
Owner
https://git.autonomic.zone/coop-cloud/mailu/src/branch/main/compose.yml#L155-L177
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#13
No description provided.