Skip to content
Snippets Groups Projects
Commit 281fafa5 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch 'develop' into 'main'

Merging develop into main

See merge request !4
parents 64f79157 c4eabd0e
No related branches found
Tags v3.0.5
1 merge request!4Merging develop into main
Pipeline #548948 passed
......@@ -104,19 +104,25 @@ class Traefik {
$traefikConfigPath = $_SERVER['HOME'] . '/.traefik/configuration';
$traefikFile = $traefikPath . '/docker-compose.yml';
$user = getenv('USER');
$fs = new Filesystem();
if (!$fs->exists($traefikPath)) {
$fs->mkdir($traefikPath);
$fs->chown($traefikPath, $user, TRUE);
}
if (!$fs->exists($traefikCertPath)) {
$fs->mkdir($traefikCertPath);
$fs->chown($traefikCertPath, $user, TRUE);
}
if (!$fs->exists($traefikConfigPath)) {
$fs->mkdir($traefikConfigPath);
$fs->chown($traefikConfigPath, $user, TRUE);
}
$upd1 = $this->updateFile($traefikConfigPath . '/certificates.toml', $this->defaultCertificatesConfig());
$upd2 = $this->updateFile($traefikFile, Yaml::dump($this->defaultDockerCompose(), 9, 2));
if ($upd1 || $upd2) {
$fs->chown($traefikConfigPath . '/certifications.toml', $user, TRUE);
$fs->chown($traefikFile, $user, TRUE);
$cwd = getcwd();
chdir($traefikPath);
exec('docker network create traefik-public 2>/dev/null');
......
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