feat: implement the caddy plugin

This plugin uses a docker-compose based Caddy installation in conjunction with injected container labels to route requests. It only exposes the minimal necessary for routing traffic to docker containers. Users wishing to customize further labels may explore using the docker-options plugin to attach additional labels during the 'deploy' phase.
This commit is contained in:
Jose Diaz-Gonzalez committed 2022-08-10 14:13:19 -04:00
1 parent 583cbc7326
commit e66671f3c5
19 files changed
+750 -1

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-caddy-install() {
declare desc="installs the caddy plugin"
declare trigger="install"
mkdir -p "${DOKKU_LIB_ROOT}/data/caddy"
chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/caddy"
fn-plugin-property-setup "caddy"
}
trigger-caddy-install "$@"