feat: implement the traefik plugin

This plugin uses a docker-compose based Traefik 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
2022-08-10 04:17:50 -04:00
parent 45e250443c
commit 8fe122ffbd
20 changed files with 810 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-traefik-vhosts-core-post-deploy() {
declare desc="traefik-vhosts core-post-deploy plugin trigger"
declare trigger="core-post-deploy"
declare APP="$1"
local HAS_NETWORK_CONFIG
if [[ "$(plugn trigger proxy-type "$APP")" != "traefik" ]]; then
return
fi
dokku_log_info1 "Routing app via traefik"
}
trigger-traefik-vhosts-core-post-deploy "$@"