einschmidt / addon-caddy-2

Caddy 2 is a powerful, open source web server with automatic HTTPS
MIT License
27 stars 8 forks source link

Expose docker file? #181

Closed etique57 closed 8 months ago

etique57 commented 9 months ago

Hello,

I'm a long time user from your addon, thank you for that by the what :)

I'd like to build a specific version of caddy (with a plugin), would you be able to expose a custom file path for the dockerfile, so that we can add this into it? image

Thanks a lot! Etienne

einschmidt commented 9 months ago

Hello @etique57 , Changing the file path for the dockerfile goes a bit against the concepts of Docker images.

However, custom caddy binary files are supported already.

Please check the option custom_binary_path, which allows you to specify a path to your custom binary file. Thus, the add-on will launch using the binary you provided.

Let me know in case you have further questions, or I misunderstood your intention.

etique57 commented 9 months ago

Sorry I wasn't clear... and maybe I misunderstood.

What I would like to achieve is to be able to have the custom caddy binary to be rebuilt each time your add on is updated (or even started).

Maybe I'll just make a pull request to try what I want to achieve!

einschmidt commented 9 months ago

Hi @etique57,

Thanks for your additional information.

Based on your description, the desired functionality could already be available. In order to use it, you will have to combine 2 settings.

  1. Create a custom build via xcaddy or download directly with selected module from https://caddyserver.com/download
  2. Place the binary into a readable and writable folder
  3. Configure the path to your custom binary via the custom_binary_pathoption
  4. Set caddy_upgrade to true. This setting will check the current version at each launch, and update caddy automatically when necessary

In summary, you will have to build your custom binary once. Updates are handled via the add-on, even if the binary is outside the add-on.

github-actions[bot] commented 8 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!