Skip to content
Snippets Groups Projects
Commit 08a96d37 authored by jurgenhaas's avatar jurgenhaas
Browse files

Add support for new features in lakedrops/traefik

parent 04a3b0dc
No related branches found
No related tags found
1 merge request!61Merging develop into main
Pipeline #783443 passed
......@@ -41,6 +41,13 @@ class Handler extends BaseHandler {
$projectname = str_replace([' ', '-', '_', '.'], '', basename(getcwd()));
$this->env->put('COMPOSE_PROJECT_NAME', $projectname);
}
$traefik_env = [];
$i = 1;
while ($item = $this->env->receive('traefik_env_' . $i, '', '0')) {
[$key, $value] = explode(':', $item);
$traefik_env[$key] = $value;
$i++;
}
return [
'docker_image_prefix' => $dockerImageProxy,
......@@ -66,10 +73,14 @@ class Handler extends BaseHandler {
'usessl' => $this->env->receive('traefik_usessl', '', '0'),
'port' => $this->env->receive('traefik_port', '', '8000'),
'ports' => $this->env->receive('traefik_ports', '', '8443'),
'cert' => $this->env->receive('traefik_cert', '', 'fullchain.pem'),
'key' => $this->env->receive('traefik_key', '', 'privkey.pem'),
'cert' => $this->env->receive('traefik_cert', '', ''),
'key' => $this->env->receive('traefik_key', '', ''),
'portainer' => $this->env->receive('traefik_portainer', '', '0'),
'hub_token' => $this->env->receive('traefik_hub_token', '', ''),
'dns_challenge' => $this->env->receive('traefik_dns_challenge', '', '0'),
'dns_challenge_provider' => $this->env->receive('traefik_dns_challenge_provider', '', ''),
'dns_challenge_resolver' => $this->env->receive('traefik_dns_challenge_resolver', '', ''),
'env' => $traefik_env,
],
'live' => [
'root' => '',
......@@ -483,10 +494,15 @@ class Handler extends BaseHandler {
$traefik = new Traefik(
$this->config->readValue('projectname'),
$this->config->readValue(['traefik', 'domain']),
$this->config->readValue(['traefik', 'port']),
$this->config->readValue(['traefik', 'ports']),
(int) $this->config->readValue(['traefik', 'port']),
(int) $this->config->readValue(['traefik', 'ports']),
$this->config->readValue(['traefik', 'cert']),
$this->config->readValue(['traefik', 'key'])
$this->config->readValue(['traefik', 'key']),
$this->config->readValue(['traefik', 'env']),
(bool) $this->config->readValue(['traefik', 'usessl']),
(bool) $this->config->readValue(['traefik', 'dns_challenge']),
$this->config->readValue(['traefik', 'dns_challenge_provider']),
$this->config->readValue(['traefik', 'dns_challenge_resolver'])
);
if ($this->config->readValue(['traefik', 'portainer'])) {
$traefik->setAddonPortainer(TRUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment