Skip to content
Snippets Groups Projects
Commit 34b13c00 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch 'develop' into 'main'

Merging develop into main

See merge request !2
parents cdafe57e e9517f69
No related branches found
Tags v3.0.3
1 merge request!2Merging develop into main
Pipeline #542706 passed
......@@ -49,6 +49,11 @@ class Traefik {
*/
protected $addon_portainer = FALSE;
/**
* @var string
*/
protected $hub_token = '';
/**
* Traefik constructor.
*
......@@ -82,6 +87,13 @@ class Traefik {
$this->addon_portainer = $addon_portainer;
}
/**
* @param string $hub_token
*/
public function setHubToken(string $hub_token): void {
$this->hub_token = $hub_token;
}
/**
* Update the Traefik container.
*/
......@@ -135,7 +147,7 @@ class Traefik {
'version' => '3.3',
'services' => [
'traefik' => [
'image' => 'traefik:2.6',
'image' => 'traefik:2.7',
'command' => [
'--api=true',
'--api.dashboard=true',
......@@ -202,6 +214,33 @@ class Traefik {
],
];
}
if ($this->hub_token) {
$config['services']['traefik']['command'][] = '--experimental.hub=true';
$config['services']['traefik']['command'][] = '--hub.tls.insecure=true';
$config['services']['traefik']['command'][] = '--metrics.prometheus.addrouterslabels=true';
$config['services']['traefik']['ports'][] = '9900:9900';
$config['services']['traefik']['ports'][] = '9901:9901';
$config['services']['hub-agent'] = [
'image' => 'ghcr.io/traefik/hub-agent-traefik:v0.7.0',
'command' => [
'run',
'--hub.token=' . $this->hub_token,
'--auth-server.advertise-url=http://hub-agent',
'--traefik.host=traefik',
'--traefik.tls.insecure=true',
],
'restart' => 'on-failure',
'networks' => [
'traefik-public',
],
'volumes' => [
'/var/run/docker.sock:/var/run/docker.sock:ro',
],
'depends_on' => [
'traefik',
],
];
}
return $config;
}
......
......@@ -8,14 +8,20 @@
"authors": [
{
"name": "Jürgen Haas",
"email": "juergen@paragon-es.de",
"homepage": "https://www.paragon-es.de",
"email": "juergen.haas@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
},
{
"name": "Daniel Speicher",
"email": "daniel.speicher@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
},
{
"name": "Richard Papp",
"email": "richard.papp@boromino.com",
"homepage": "http://www.boromino.com",
"email": "richard.papp@lakedrops.com",
"homepage": "https://www.lakedrops.com",
"role": "Drupal Expert"
}
],
......@@ -31,7 +37,10 @@
},
"require-dev": {
"composer/composer": "^1||^2",
"phpunit/phpunit": "^8.4"
"drupal/coder": "^8.3",
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.7"
},
"minimum-stability": "dev",
"prefer-stable": true,
......@@ -39,5 +48,10 @@
"psr-4": {
"LakeDrops\\DockerTraefik\\": ""
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": 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