Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# please see the online documentation at vagrantup.com.

# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "debian/contrib-jessie64"
config.vm.box = "NottingHack/hms2"
config.vm.hostname = "hmsdev.nottingtest.org.uk"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/bootstrap.sh"

config.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '2048']
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
end

config.vm.provision :shell, path: "dev/vagrant-config/scripts/nginx.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/database.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/php.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/kerberos.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/node.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/laravel.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/mix.sh", privileged: false
config.vm.provision :shell, path: "dev/vagrant-config/scripts/finish.sh"
Expand Down
8 changes: 4 additions & 4 deletions dev/vagrant-config/laravel/.env
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=2536565eb232461fc
MAIL_PASSWORD=d4b2263a5e18e4
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=membership@nottinghack.org.uk
MAIL_FROM_NAME="Nottinghack Membership Team"
Expand Down
91 changes: 0 additions & 91 deletions dev/vagrant-config/nginx/default

This file was deleted.

11 changes: 0 additions & 11 deletions dev/vagrant-config/scripts/apache.sh

This file was deleted.

27 changes: 0 additions & 27 deletions dev/vagrant-config/scripts/bootstrap.sh

This file was deleted.

18 changes: 0 additions & 18 deletions dev/vagrant-config/scripts/database.sh

This file was deleted.

7 changes: 4 additions & 3 deletions dev/vagrant-config/scripts/finish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ echo "Your hosts file needs to have a 'hmsdev' entry."
echo "Linux / MacOS: /etc/hosts"
echo "Windows: C:\Windows\System32\Drivers\etc\hosts"
echo ""
echo "192.168.25.35 hmsdev"
echo "192.168.25.35 hmsdev vimbadmin-api.hmsdev"
echo ""
echo "Info: https://github.com/NottingHack/hms2/blob/master/README.md"
echo ""
echo "phpMyAdmin: https://hsmdev/phpmyadmin/"
echo "mialhog: http://hmsdev:8025/"
echo "vimbadmin-api: http://vimbadmin-api.hmsdev/"
echo ""
echo "MySQL: username = root, password = root"
echo "kadmin: username = vagrant password = vagrant"
echo "HMS: username = admin password = admin"
#echo ""
#echo "You can access the database at http://hmsdev/phpmyadmin/"
echo "------------------------------------------------------------------------"
echo ""
54 changes: 0 additions & 54 deletions dev/vagrant-config/scripts/kerberos.sh

This file was deleted.

5 changes: 0 additions & 5 deletions dev/vagrant-config/scripts/laravel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ echo " "
echo "LARAVEL"
echo " "

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"

cd /vagrant
composer install --no-progress --no-suggest

Expand Down
20 changes: 0 additions & 20 deletions dev/vagrant-config/scripts/mix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@ echo "Laravel Mix"
echo "running as user $_user ($_uid)"
echo " "

# create mix watch script
cat <<\EOF > /home/vagrant/mixwatch.sh
#!/bin/bash
cd /vagrant/
echo "Starting mix watch" >> /vagrant/dev/mixwatch.log;
while [ 1 ]; do
yarn run watch-poll >> /vagrant/dev/mixwatch.log 2>&1;
echo "Restarting mix watch" >> /vagrant/dev/mixwatch.log;
done
EOF

cat <<\EOF > /home/vagrant/restartwatch.sh
#!/bin/bash
pkill -9 -f yarn
/home/vagrant/mixwatch.sh &
EOF

chmod +x /home/vagrant/mixwatch.sh
chmod +x /home/vagrant/restartwatch.sh

# move to the share folder and use yarn to install deps
mkdir ~/hms2/
cp /vagrant/package.json ~/hms2/
Expand Down
8 changes: 3 additions & 5 deletions dev/vagrant-config/scripts/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ echo " "
echo "NGINX"
echo " "

apt-get install -y nginx-full > /dev/null 2>&1
mkdir /etc/nginx/ssl
openssl genrsa -out /etc/nginx/ssl/hmsdev.key 2048 > /dev/null 2>&1
openssl req -new -x509 -key /etc/nginx/ssl/hmsdev.key -out /etc/nginx/ssl/hmsdev.cert -days 3650 -subj /CN=hmsdev > /dev/null 2>&1
# now we have the share setup we can enable the site
ln -s /etc/nginx//sites-available/default /etc/nginx/sites-enabled/default

cp /vagrant/dev/vagrant-config/nginx/default /etc/nginx/sites-available/default
service nginx restart
14 changes: 0 additions & 14 deletions dev/vagrant-config/scripts/node.sh

This file was deleted.

25 changes: 0 additions & 25 deletions dev/vagrant-config/scripts/php.sh

This file was deleted.