When configuring the package, you probably will have configured a default server type.
The package can handle multiple server types. Here's how you can configure another server type using the new
method.
$serverType = ServerType::new('big')
->provider('up_cloud')
->configuration(function (Server $server) {
return [
],
];
});
DynamicServers::registerServerType($serverType);
Most methods on DynamicServers
accept a parameter to specify a server type. When you specify a server type to any of these methods, servers of another type will not be touched.
use Spatie\DynamicServers\Facades\DynamicServers;
DynamicServers::ensure(5)
DynamicServers::ensure(3, 'big')
DynamicServers::reboot()
DynamicServers::reboot('big')
DynamicServers::increase()
DynamicServers::increase(type: 'big')
DynamicServers::decrease()
DynamicServers::decrease(type: 'big')