Add internal support for file denylist on eggs; closes #569
This commit is contained in:
parent
ff21d83e2d
commit
239984f92c
7 changed files with 64 additions and 2 deletions
|
@ -46,6 +46,7 @@ class EggExporterService
|
|||
'description' => $egg->description,
|
||||
'features' => $egg->features,
|
||||
'images' => $egg->docker_images,
|
||||
'file_denylist' => $egg->inherit_file_denylist,
|
||||
'startup' => $egg->startup,
|
||||
'config' => [
|
||||
'files' => $egg->inherit_config_files,
|
||||
|
|
|
@ -105,6 +105,7 @@ class EggImporterService
|
|||
// Maintain backwards compatability for eggs that are still using the old single image
|
||||
// string format. New eggs can provide an array of Docker images that can be used.
|
||||
'docker_images' => object_get($parsed, 'images') ?? [object_get($parsed, 'image')],
|
||||
'file_denylist' => implode(PHP_EOL, object_get($parsed, 'file_denylist') ?? []),
|
||||
'update_url' => object_get($parsed, 'meta.update_url'),
|
||||
'config_files' => object_get($parsed, 'config.files'),
|
||||
'config_startup' => object_get($parsed, 'config.startup'),
|
||||
|
@ -118,7 +119,7 @@ class EggImporterService
|
|||
], true, true);
|
||||
|
||||
collect($parsed->variables)->each(function ($variable) use ($egg) {
|
||||
$this->eggVariableRepository->create(array_merge((array) $variable, [
|
||||
$this->eggVariableRepository->create(array_merge((array)$variable, [
|
||||
'egg_id' => $egg->id,
|
||||
]));
|
||||
});
|
||||
|
|
|
@ -91,6 +91,14 @@ class ServerConfigurationStructureService
|
|||
'read_only' => $mount->read_only,
|
||||
];
|
||||
}),
|
||||
'egg' => [
|
||||
'id' => $server->egg->uuid,
|
||||
'file_denylist' => [
|
||||
'config.yml',
|
||||
'**/*.json'
|
||||
]
|
||||
// 'file_denylist' => explode(PHP_EOL, $server->egg->inherit_file_denylist),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue