Skip to content

Commit

Permalink
Add Vagrantfile and rename TelebureauClient files to fix autoloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Ramsay committed Jun 8, 2021
1 parent 4470a4a commit cca656d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

remi = ["php72", "php73", "php74", "php80"]

composer = <<-SHELL
EXPECTED_SIGNATURE=$(curl https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
rm composer-setup.php
mv composer.phar /usr/bin/composer
SHELL

Vagrant.configure("2") do |config|
config.vm.box = "centos/7"

config.vm.provision "shell", inline: <<-SHELL
if ! yum info remi-release
then
curl -O http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum -y install ./remi-release-7.rpm
fi
SHELL

remi.each do |repo|
config.vm.define "#{repo}" do |i|
i.vm.provision "shell", inline: <<-SHELL
yum-config-manager --enable remi-#{repo}
yum -y install php php-xml php-mbstring php-pecl-zip
if ! command -v composer &> /dev/null
then
#{composer}
fi
SHELL
end
end
end
File renamed without changes.
File renamed without changes.

0 comments on commit cca656d

Please sign in to comment.