From 2d1e26e6cc89830f358cace6b510cabb7d9fe9d6 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Thu, 3 Aug 2023 16:27:55 +0200 Subject: [PATCH] Vagrant box is now configurable --- app/Infrastructure/Vagrant.php | 4 +++- config/eddy.php | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Infrastructure/Vagrant.php b/app/Infrastructure/Vagrant.php index d2b12e8..54e459a 100644 --- a/app/Infrastructure/Vagrant.php +++ b/app/Infrastructure/Vagrant.php @@ -150,9 +150,11 @@ public function createServer(string $name, string $regionId, string $typeId, str $id = (string) $this->generateServerId(); $ipAddress = $this->getPublicIpv4OfServer($id); + $vagrantBox = config('eddy.vagrant_box'); + $vagrantFile = " Vagrant.configure(\"2\") do |config| - config.vm.box = \"ubuntu/jammy64\" + config.vm.box = \"{$vagrantBox}\" config.vm.provider \"virtualbox\" do |vb| vb.name = '{$name}-{$id}' diff --git a/config/eddy.php b/config/eddy.php index 1da67e9..1ed4b98 100644 --- a/config/eddy.php +++ b/config/eddy.php @@ -65,4 +65,9 @@ * A little helper to fake the validation of provider tokens (used in the Dusk tests). */ 'fake_credentials_validation' => env('FAKE_CREDENTIALS_VALIDATION', false), + + /** + * The default Vagrant box that is used when provisioning a new server. + */ + 'vagrant_box' => 'ubuntu/jammy64', ];