Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker container's expected certificate names, tls_cert.pem and tls_key.pem #350

Closed
1 task
Avamander opened this issue Apr 26, 2021 · 5 comments
Closed
1 task
Assignees
Labels
new feature New feature. ready-for-release Feature is implemented and available for testing in dev branch. It will be included in the next rele
Milestone

Comments

@Avamander
Copy link
Contributor

Use case

Currently the docker container expects the certificates to be named tls_cert.pem and tls_key.pem but Certbot stores the two as cert.pem and privkey.pem. I guess reconfiguration is also possible, but why require that if it's possible not to.

Your idea for a solution

It would just be really nice if reconfiguration could be avoided and the defaults allow very comfy and seamless mount+usage of Certbot's files.

  • I'm willing to help with the implementation
@Avamander Avamander added the new feature New feature. label Apr 26, 2021
@foxcpp foxcpp self-assigned this Apr 26, 2021
@foxcpp
Copy link
Owner

foxcpp commented Apr 26, 2021

So something like this

tls file /data/certs/$(hostname)/fullchain.pem /data/certs/$(hostname)/privkey.pem

is desired?
This could be achieved by changing TLS-related line in Dockerfile to:

RUN sed -Ei 's!/etc/maddy/certs!/data/certs!g' /pkg/data/maddy.conf

@Avamander
Copy link
Contributor Author

So something like this

tls file /data/certs/$(hostname)/fullchain.pem /data/certs/$(hostname)/privkey.pem

is desired?

Yep, something like that.

This could be achieved by changing TLS-related line in Dockerfile to:

RUN sed -Ei 's!/etc/maddy/certs!/data/certs!g' /pkg/data/maddy.conf

I was more suggesting that if there isn't a reason to have the current names why not use the ones that don't require any renaming(/sed'ing).

@foxcpp
Copy link
Owner

foxcpp commented Apr 30, 2021

There is a reason for putting configuration in /data* and then I just went with putting TLS keys there as well.

* this locks configuration on first image use - exact config file contents are -not- covered by any compatibility promises.

@foxcpp foxcpp added the breaking-config Backward-incompatible changes needed to the configuration structure label May 7, 2021
@foxcpp foxcpp added this to the 0.5 milestone May 7, 2021
@foxcpp foxcpp removed the breaking-config Backward-incompatible changes needed to the configuration structure label May 7, 2021
@arisudesu
Copy link
Contributor

I suggest to avoid sed-patching configuration in Dockerfile. It'd be better if the config embedded in the image was accessible in separate file in repo, rather than having to poke around in the image to extract it.

@foxcpp foxcpp removed their assignment Jul 12, 2021
@foxcpp foxcpp modified the milestones: 0.5, 0.6 Aug 9, 2021
@foxcpp
Copy link
Owner

foxcpp commented Jun 18, 2022

With the introduction of built-in ACME client, this issue is probably much less relevant. Howver, I will change default names to /data/tls/fullchain.pem, /data/tls/privkey.pem and put the maddy.conf used by Docker image in the repo.

@foxcpp foxcpp self-assigned this Jun 18, 2022
@foxcpp foxcpp added the ready-for-release Feature is implemented and available for testing in dev branch. It will be included in the next rele label Jun 18, 2022
foxcpp added a commit that referenced this issue Jun 23, 2022
* Use TLS filenames same as certbot (see #350).
* Put the Docker-specific maddy.conf in the repo (see #350).
* Set OCI labels for the image in CI
* Move Docker-specific documentation from Docker Hub into docs/
* Add .dockerignore
@foxcpp foxcpp closed this as completed Jun 23, 2022
shift pushed a commit to shift/maddy that referenced this issue Jul 5, 2022
* Use TLS filenames same as certbot (see foxcpp#350).
* Put the Docker-specific maddy.conf in the repo (see foxcpp#350).
* Set OCI labels for the image in CI
* Move Docker-specific documentation from Docker Hub into docs/
* Add .dockerignore
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
new feature New feature. ready-for-release Feature is implemented and available for testing in dev branch. It will be included in the next rele
Projects
None yet
Development

No branches or pull requests

3 participants