Skip to content

Commit 9a803e6

Browse files
committed
Update seeder and migrations to use new docker images.
1 parent 710d5f1 commit 9a803e6

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

database/migrations/2017_03_05_212803_DeleteServiceExecutableOption.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,26 @@ public function up()
1616
{
1717
DB::transaction(function () {
1818
// Attempt to fix any startup commands for servers
19-
// that we possibly can.
19+
// that we possibly can. Also set new containers.
2020
foreach (ServiceOption::with('servers')->get() as $option) {
2121
$option->servers->each(function ($s) use ($option) {
2222
$prepend = $option->display_executable;
2323
$prepend = ($prepend === './ShooterGameServer') ? './ShooterGame/Binaries/Linux/ShooterGameServer' : $prepend;
2424
$prepend = ($prepend === 'TerrariaServer.exe') ? 'mono TerrariaServer.exe' : $prepend;
2525

2626
$s->startup = $prepend . ' ' . $s->startup;
27+
28+
$container = $s->container;
29+
if (starts_with($container, 'quay.io/pterodactyl/minecraft')) {
30+
$s->container = 'quay.io/pterodactyl/core:java';
31+
} elseif (starts_with($container, 'quay.io/pterodactyl/srcds')) {
32+
$s->container = 'quay.io/pterodactyl/core:source';
33+
} elseif (starts_with($container, 'quay.io/pterodactyl/voice')) {
34+
$s->container = 'quay.io/pterodactyl/core:glibc';
35+
} elseif (starts_with($container, 'quay.io/pterodactyl/terraria')) {
36+
$s->container = 'quay.io/pterodactyl/core:mono'
37+
}
38+
2739
$s->save();
2840
});
2941
}

database/seeds/MinecraftServiceTableSeeder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function addCoreOptions()
116116
], [
117117
'name' => 'Vanilla Minecraft',
118118
'description' => 'Minecraft is a game about placing blocks and going on adventures. Explore randomly generated worlds and build amazing things from the simplest of homes to the grandest of castles. Play in Creative Mode with unlimited resources or mine deep in Survival Mode, crafting weapons and armor to fend off dangerous mobs. Do all this alone or with friends.',
119-
'docker_image' => 'quay.io/pterodactyl/minecraft',
119+
'docker_image' => 'quay.io/pterodactyl/core:java',
120120
'config_startup' => '{"done": ")! For help, type ", "userInteraction": [ "Go to eula.txt for more info."]}',
121121
'config_logs' => '{"custom": false, "location": "logs/latest.log"}',
122122
'config_files' => '{"server.properties":{"parser": "properties", "find":{"server-ip": "0.0.0.0", "enable-query": "true", "server-port": "{{server.build.default.port}}", "query.port": "{{server.build.default.port}}"}}}',
@@ -131,7 +131,7 @@ private function addCoreOptions()
131131
], [
132132
'name' => 'Spigot',
133133
'description' => 'Spigot is the most widely-used modded Minecraft server software in the world. It powers many of the top Minecraft server networks around to ensure they can cope with their huge player base and ensure the satisfaction of their players. Spigot works by reducing and eliminating many causes of lag, as well as adding in handy features and settings that help make your job of server administration easier.',
134-
'docker_image' => 'quay.io/pterodactyl/minecraft:spigot',
134+
'docker_image' => 'quay.io/pterodactyl/core:java',
135135
'config_startup' => null,
136136
'config_files' => '{"spigot.yml":{"parser": "yaml", "find":{"settings.restart-on-crash": "false"}}}',
137137
'config_logs' => null,
@@ -146,7 +146,7 @@ private function addCoreOptions()
146146
], [
147147
'name' => 'Sponge (SpongeVanilla)',
148148
'description' => 'SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.',
149-
'docker_image' => 'quay.io/pterodactyl/minecraft:sponge',
149+
'docker_image' => 'quay.io/pterodactyl/core:java',
150150
'config_startup' => '{"userInteraction": [ "You need to agree to the EULA"]}',
151151
'config_files' => null,
152152
'config_logs' => null,
@@ -161,7 +161,7 @@ private function addCoreOptions()
161161
], [
162162
'name' => 'Bungeecord',
163163
'description' => 'For a long time, Minecraft server owners have had a dream that encompasses a free, easy, and reliable way to connect multiple Minecraft servers together. BungeeCord is the answer to said dream. Whether you are a small server wishing to string multiple game-modes together, or the owner of the ShotBow Network, BungeeCord is the ideal solution for you. With the help of BungeeCord, you will be able to unlock your community\'s full potential.',
164-
'docker_image' => 'quay.io/pterodactyl/minecraft:bungeecord',
164+
'docker_image' => 'quay.io/pterodactyl/core:java',
165165
'config_startup' => '{"done": "Listening on ", "userInteraction": [ "Listening on /0.0.0.0:25577"]}',
166166
'config_files' => '{"config.yml":{"parser": "yaml", "find":{"listeners[0].query_enabled": true, "listeners[0].query_port": "{{server.build.default.port}}", "listeners[0].host": "0.0.0.0:{{server.build.default.port}}", "servers.*.address":{"127.0.0.1": "{{config.docker.interface}}", "localhost": "{{config.docker.interface}}"}}}}',
167167
'config_logs' => '{"custom": false, "location": "proxy.log.0"}',

database/seeds/SourceServiceTableSeeder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function addCoreOptions()
7575
], [
7676
'name' => 'Custom Source Engine Game',
7777
'description' => 'This option allows modifying the startup arguments and other details to run a custo SRCDS based game on the panel.',
78-
'docker_image' => 'quay.io/pterodactyl/srcds',
78+
'docker_image' => 'quay.io/pterodacty/core:source',
7979
'config_startup' => '{"done": "gameserver Steam ID", "userInteraction": []}',
8080
'config_files' => '{}',
8181
'config_logs' => '{"custom": true, "location": "logs/latest.log"}',
@@ -90,7 +90,7 @@ private function addCoreOptions()
9090
], [
9191
'name' => 'Insurgency',
9292
'description' => 'Take to the streets for intense close quarters combat, where a team\'s survival depends upon securing crucial strongholds and destroying enemy supply in this multiplayer and cooperative Source Engine based experience.',
93-
'docker_image' => 'quay.io/pterodactyl/srcds',
93+
'docker_image' => 'quay.io/pterodacty/core:source',
9494
'config_startup' => null,
9595
'config_files' => null,
9696
'config_logs' => null,
@@ -105,7 +105,7 @@ private function addCoreOptions()
105105
], [
106106
'name' => 'Team Fortress 2',
107107
'description' => 'Team Fortress 2 is a team-based first-person shooter multiplayer video game developed and published by Valve Corporation. It is the sequel to the 1996 mod Team Fortress for Quake and its 1999 remake.',
108-
'docker_image' => 'quay.io/pterodactyl/srcds',
108+
'docker_image' => 'quay.io/pterodacty/core:source',
109109
'config_startup' => null,
110110
'config_files' => null,
111111
'config_logs' => null,
@@ -120,7 +120,7 @@ private function addCoreOptions()
120120
], [
121121
'name' => 'Ark: Survival Evolved',
122122
'description' => 'As a man or woman stranded, naked, freezing, and starving on the unforgiving shores of a mysterious island called ARK, use your skill and cunning to kill or tame and ride the plethora of leviathan dinosaurs and other primeval creatures roaming the land. Hunt, harvest resources, craft items, grow crops, research technologies, and build shelters to withstand the elements and store valuables, all while teaming up with (or preying upon) hundreds of other players to survive, dominate... and escape! — Gamepedia: ARK',
123-
'docker_image' => 'quay.io/pterodactyl/srcds:ark',
123+
'docker_image' => 'quay.io/pterodacty/core:source',
124124
'config_startup' => '{"done": "Setting breakpad minidump AppID"}',
125125
'config_files' => null,
126126
'config_logs' => null,

database/seeds/TerrariaServiceTableSeeder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function addCoreOptions()
7474
], [
7575
'name' => 'Terraria Server (TShock)',
7676
'description' => 'TShock is a server modification for Terraria, written in C#, and based upon the Terraria Server API. It uses JSON for configuration management, and offers several features not present in the Terraria Server normally.',
77-
'docker_image' => 'quay.io/pterodactyl/terraria:tshock',
77+
'docker_image' => 'quay.io/pterodactyl/core:mono',
7878
'config_startup' => '{"userInteraction": [ "You need to agree to the EULA"]}',
7979
'config_startup' => '{"done": "Type \'help\' for a list of commands", "userInteraction": []}',
8080
'config_files' => '{"tshock/config.json":{"parser": "json", "find":{"ServerPort": "{{server.build.default.port}}", "MaxSlots": "{{server.build.env.MAX_SLOTS}}"}}}',

database/seeds/VoiceServiceTableSeeder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function addCoreOptions()
7474
], [
7575
'name' => 'Mumble Server',
7676
'description' => 'Mumble is an open source, low-latency, high quality voice chat software primarily intended for use while gaming.',
77-
'docker_image' => 'quay.io/pterodactyl/voice:mumble',
77+
'docker_image' => 'quay.io/pterodactyl/core:glibc',
7878
'config_startup' => '{"done": "Server listening on", "userInteraction": [ "Generating new server certificate"]}',
7979
'config_files' => '{"murmur.ini":{"parser": "ini", "find":{"logfile": "murmur.log", "port": "{{server.build.default.port}}", "host": "0.0.0.0", "users": "{{server.build.env.MAX_USERS}}"}}}',
8080
'config_logs' => '{"custom": true, "location": "logs/murmur.log"}',
@@ -89,7 +89,7 @@ private function addCoreOptions()
8989
], [
9090
'name' => 'Teamspeak3 Server',
9191
'description' => 'VoIP software designed with security in mind, featuring crystal clear voice quality, endless customization options, and scalabilty up to thousands of simultaneous users.',
92-
'docker_image' => 'quay.io/pterodactyl/voice:ts3',
92+
'docker_image' => 'quay.io/pterodactyl/core:glibc',
9393
'config_startup' => '{"done": "listening on 0.0.0.0:", "userInteraction": []}',
9494
'config_files' => '{"ts3server.ini":{"parser": "ini", "find":{"default_voice_port": "{{server.build.default.port}}", "voice_ip": "0.0.0.0", "query_port": "{{server.build.default.port}}", "query_ip": "0.0.0.0"}}}',
9595
'config_logs' => '{"custom": true, "location": "logs/ts3.log"}',

0 commit comments

Comments
 (0)