Commit 6f8828ca authored by mh's avatar mh
Browse files

introduce container-config directory & make auth editable by users

parent ec26a618
......@@ -66,7 +66,29 @@ define webhosting::container (
default => $gid,
}
}
$container_config_directory = "/var/www/vhosts/${name}/private/container-config"
file {
$container_config_directory:
ensure => directory,
owner => $real_uid,
group => $real_gid,
}
$user_container_config = pick($configuration['container_config'],{})
$con_config = { 'config_directory' => $container_config_directory } + pick($user_container_config['configuration'], {})
$auth = pick($user_container_config['auth'],{})
podman::container::auth {
"user-${name}":
auth => $auth,
path => "${container_config_directory}/container-config/registry-auth.yaml",
replace => false,
user => $uid_name,
group => $real_group,
owner => $uid_name,
mode => '0600',
order => '040',
}
webhosting::common { $name:
ensure => $ensure,
uid => $real_uid,
......@@ -96,6 +118,7 @@ define webhosting::container (
homedir => "/var/www/vhosts/${name}",
manage_user => false,
image => $image,
configuration => $con_config,
publish_socket => {
$port => {
'dir' => "/var/www/vhosts/${name}/tmp/run",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment