From 989a6631bae2bce72853fd7aae574ef95066c089 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Tue, 2 Feb 2016 18:39:09 -0800 Subject: [PATCH] Moved the dev environment's datastore into the storage directory. --- README.md | 8 +++----- Vagrantfile | 6 ++---- resources/environments/.env.local | 2 +- vagrant/copy-and-restart-configs.sh | 4 ++-- vagrant/pony.fm.nginx.site.config | 4 ++-- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 956a2dda..95569f67 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,11 @@ To begin development, do the following: 3. Install the `vagrant-bindfs` plugin: `vagrant plugin install vagrant-bindfs` -4. Create the directory `pony.fm.files` in the repository's parent directory +4. Run `vagrant up` from the folder in which you cloned the repository -5. Run `vagrant up` from the folder in which you cloned the repository +5. Run `vagrant ssh`, `cd /vagrant`, and `php artisan poni:setup`. -6. Run `vagrant ssh`, `cd /vagrant`, and `php artisan poni:setup`. - -7. Follow the instructions in the "Asset pipeline" section below to set that up. +6. Follow the instructions in the "Asset pipeline" section below to set that up. Once everything is up and running, you'll be able to access the site at [http://ponyfm-dev.poni/](http://ponyfm-dev.poni/). You can access the MySQL database by logging into **ponyfm-dev.poni:3306** with the username **homestead** and the password **secret**. Pony.fm's database is named **homestead**. diff --git a/Vagrantfile b/Vagrantfile index d928e0e7..1350ff8c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,6 +5,7 @@ Vagrant.configure("2") do |config| config.vm.box = 'laravel/homestead-7' config.vm.box_version = '0.2.1' + config.vm.provider "virtualbox" do |v| v.cpus = 4 v.memory = 1024 @@ -17,11 +18,8 @@ Vagrant.configure("2") do |config| end config.vm.synced_folder ".", "/vagrant", type: "nfs" + config.bindfs.bind_folder "/vagrant", "/vagrant" config.vm.provision "shell", path: "vagrant/install.sh" - - config.vm.synced_folder "../pony.fm.files", "/vagrant-files", type: "nfs" - config.bindfs.bind_folder "/vagrant", "/vagrant" - config.vm.provision "shell", path: "vagrant/copy-and-restart-configs.sh", run: "always" end diff --git a/resources/environments/.env.local b/resources/environments/.env.local index 5503e87a..042397be 100644 --- a/resources/environments/.env.local +++ b/resources/environments/.env.local @@ -21,6 +21,6 @@ MAIL_ENCRYPTION=null PONI_CLIENT_ID=null PONI_CLIENT_SECRET=null -PONYFM_DATASTORE=/vagrant-files +PONYFM_DATASTORE=/vagrant/storage/app/datastore GOOGLE_ANALYTICS_ID=null diff --git a/vagrant/copy-and-restart-configs.sh b/vagrant/copy-and-restart-configs.sh index 49a94161..d4f2ab93 100755 --- a/vagrant/copy-and-restart-configs.sh +++ b/vagrant/copy-and-restart-configs.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +mkdir -p /vagrant/storage/app/datastore + sudo cp /vagrant/vagrant/pony.fm.nginx.config /etc/nginx/nginx.conf sudo cp /vagrant/vagrant/pony.fm.nginx.site.config /etc/nginx/sites-enabled/pony.fm @@ -10,5 +12,3 @@ sudo cp /vagrant/vagrant/pony.fm.redis.config /etc/redis/redis.conf sudo service elasticsearch restart sudo service nginx restart sudo service php7.0-fpm restart - -# todo: figure out how to restart redis diff --git a/vagrant/pony.fm.nginx.site.config b/vagrant/pony.fm.nginx.site.config index abd4cc7b..a888ae9a 100644 --- a/vagrant/pony.fm.nginx.site.config +++ b/vagrant/pony.fm.nginx.site.config @@ -20,9 +20,9 @@ server { expires off; - location /vagrant-files { + location /vagrant/storage/app/datastore { internal; - alias /vagrant-files/; + alias /vagrant/storage/app/datastore/; } location ~* \.php$ {