Basic implemention of multiple selectable images for an egg
The admin side of this is quite ugly when creating/editing a server, but I'm not putting effort into that right now with React Admin soon™
This commit is contained in:
parent
3e65a2d055
commit
78c4ac80bc
11 changed files with 123 additions and 31 deletions
|
@ -38,13 +38,14 @@ class EggExporterService
|
|||
'_comment' => 'DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO',
|
||||
'meta' => [
|
||||
'version' => 'PTDL_v1',
|
||||
'update_url' => $egg->update_url,
|
||||
],
|
||||
'exported_at' => Carbon::now()->toIso8601String(),
|
||||
'name' => $egg->name,
|
||||
'author' => $egg->author,
|
||||
'description' => $egg->description,
|
||||
'features' => $egg->features,
|
||||
'image' => $egg->docker_image,
|
||||
'images' => $egg->docker_images,
|
||||
'startup' => $egg->startup,
|
||||
'config' => [
|
||||
'files' => $egg->inherit_config_files,
|
||||
|
|
|
@ -102,7 +102,10 @@ class EggImporterService
|
|||
'name' => object_get($parsed, 'name'),
|
||||
'description' => object_get($parsed, 'description'),
|
||||
'features' => object_get($parsed, 'features'),
|
||||
'docker_image' => object_get($parsed, 'image'),
|
||||
// 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')],
|
||||
'update_url' => object_get($parsed, 'meta.update_url'),
|
||||
'config_files' => object_get($parsed, 'config.files'),
|
||||
'config_startup' => object_get($parsed, 'config.startup'),
|
||||
'config_logs' => object_get($parsed, 'config.logs'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue