Update seeder and migrations to use new docker images.

This commit is contained in:
Dane Everitt 2017-03-18 14:49:48 -04:00
parent 710d5f111a
commit 9a803e61ec
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 24 additions and 12 deletions

View file

@ -16,7 +16,7 @@ class DeleteServiceExecutableOption extends Migration
{
DB::transaction(function () {
// Attempt to fix any startup commands for servers
// that we possibly can.
// that we possibly can. Also set new containers.
foreach (ServiceOption::with('servers')->get() as $option) {
$option->servers->each(function ($s) use ($option) {
$prepend = $option->display_executable;
@ -24,6 +24,18 @@ class DeleteServiceExecutableOption extends Migration
$prepend = ($prepend === 'TerrariaServer.exe') ? 'mono TerrariaServer.exe' : $prepend;
$s->startup = $prepend . ' ' . $s->startup;
$container = $s->container;
if (starts_with($container, 'quay.io/pterodactyl/minecraft')) {
$s->container = 'quay.io/pterodactyl/core:java';
} elseif (starts_with($container, 'quay.io/pterodactyl/srcds')) {
$s->container = 'quay.io/pterodactyl/core:source';
} elseif (starts_with($container, 'quay.io/pterodactyl/voice')) {
$s->container = 'quay.io/pterodactyl/core:glibc';
} elseif (starts_with($container, 'quay.io/pterodactyl/terraria')) {
$s->container = 'quay.io/pterodactyl/core:mono'
}
$s->save();
});
}