Skip to content

Commit

Permalink
Add Vagrant support (#44)
Browse files Browse the repository at this point in the history
* add Vagrant

* remove accidentally commited file
  • Loading branch information
schrej authored and Schuldkroete committed Jun 14, 2018
1 parent 94824ca commit 67c2a57
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var/
.env
vendor/
.vagrant/

###> symfony/web-server-bundle ###
/.web-server-pid
Expand Down
10 changes: 10 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"

config.vm.synced_folder "./", "/var/www/html",
owner: "www-data", group: "www-data"

config.vm.provision :shell, path: "./provision_vagrant.sh"

config.vm.network :forwarded_port, guest: 80, host: 50080
end
23 changes: 23 additions & 0 deletions provision_vagrant.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
echo "Add the ondrej/php ppa repository"
add-apt-repository -y ppa:ondrej/php > /dev/null
echo "Add the mariadb repository"
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash > /dev/null

apt-get update > /dev/null

echo "Install the dependencies"
export DEBIAN_FRONTEND=noninteractive
# set the mariadb root password because mariadb asks for it
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password password savetheinternet'
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password_again password savetheinternet'
# actually install
apt-get install -y nginx curl zip unzip git software-properties-common supervisor sqlite3 php7.1-fpm php7.1-cli php7.1-gd php7.1-mbstring php7.1-xml php7.1-curl php7.1-sqlite3 > /dev/null

echo "Install composer"
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

echo "Install nodejs and yarn"
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
apt-get -y install nodejs yarn > /dev/null

0 comments on commit 67c2a57

Please sign in to comment.