|Stanislav Nikitin 540e3b4a54 Missing plugins, fixes #2.||1 month ago|
|builder||1 month ago|
|cmdworker||1 month ago|
|common||1 month ago|
|flagger||1 month ago|
|plugins||1 month ago|
|LICENSE||1 month ago|
|README.md||1 month ago|
|caddybuilder.go||1 month ago|
This application builds Caddy webserver with neccessary plugins. Great for deploying automation and already used in production.
This project was created after failing to obtain code which is used on https://caddyserver.com/download to make Caddy builds with custom feature set.
After I wrote the very first version of Caddybuilder I found https://github.com/caddyserver/devportal, but it’s not what I want.
Note: there are some plugins that missing from official Caddy website. They might or might not work!
Repository on Github is a mirror. Real development is going at pztrn’s Lab. Please, report bugs there.
It is enough to do:
go get lab.pztrn.name/pztrn/caddybuilder
ONLY NIX SYSTEMS ARE SUPPORTED FOR NOW!
Execute this command to get list of available options:
By default no additional plugins will be installed, so you should pass some flags to caddybuilder binary to get plugin included.
Note: by default every new Caddy build will be placed as
-output parameter with value
to overwrite it!
For now I’m commiting to master branch, until first release. After that master branch will be “always stable”.
To make a PR you should fork this repository, create own branch (e.g. “$nick_changes”), do some coding, and make a PR against “development” branch.
Every commit should be covered by tests. PRs with new functions and without tests are unacceptable and will be rejected.
Take a look into any plugin, they’re pretty straightforward.
handler packages are not plugins, but:
contextis a structure with some useful things that passed to plugins.
handleris an interface for plugins.
Plugins require no tests to be written, instead it will be tested as part
plugins package. It will test all plugins that have been initialized
plugins/plugins.go. If any error arises -
go test will print it
If plugin require separate test (e.g. it do some requests or doint something
more that replacing “default replace line” in
run.go) - test should be
plugins/plugins_test.go and named like
Name- should be replaced with plugin name (e.g. “Realip”).
Action- should be replaced to function name or action name.
Issue this command to execute all tests:
go test -test.v ./...
Full tests execution takes approx. 1-2 minutes. Specify
-short to skip
go get execution and Caddy building. This can be useful if
you’re writing a plugin:
go test -test.v -short ./...