Using Vagrant next steps

We’ll I’ve succeeded in getting a functional box up and running for my Laravel project. First tested it on a local VM using virtualbox, Vagrant and a bunch of shell scripts which I compiled from a lot of other similar efforts found on the internet. It stil lrequired a lot of trial and effort to get it where it is now. A functioning box which will run my project. It will deploy the code from a git repository and will use a previous database backup to initiate the database. No database migrations for me at the moment.

Next step was to get it running on DigitalOcean (referral link), I used the DigitalOcean Vagrant provider which you can find on GitHub. Just follow the instructions and the next time you call “vagrant up” it’s running on a VPS at DigitalOcean.

I’ve still got several things to figure out:

  • How to seperate configuration from scripts.
  • Getting Certbot included in the build proces and automate renewal.
  • How to do an upgrade without destroying the previous build.

So, still some tinkering to do…

Using Vagrant to deploy Laravel box

I’ve building a personal project in Laravel for maintaining my bookmarks. I’ve been toying with this for some time and I’m now ready enough to deploy it to VPS somewhere. This so I can open it up for beta testing by others then me myself. But how to deploy in a repeatable fashion that is easy. I could use ready made setups, like Envoyer, but they all cost money to keep them running and for a simple hobby project I find this overkill.

For local development there is an easy solution to get a VPS running (using virtualbox), it’s called Homestead and is a lifesaver (and time saver). It uses Vagrant to give you a box complete with all the software configured and using shared folders syncing all the coding developments with your local filesystem. You can work on your local filesystem and test the output on the VPS.

So I started looking at using Vagrant for creating a test and production box which looked similar to Homestead but as simple as possible for my needs. I found many setup’s on how to create your own VPS with Vagrant and I think I’ve got it almost nailed to get a machine up and running using Vagrant with shell scripts where I can test and deploy my own project. I might release it when I’m satisfied and documented it just enough to maintain/eaplain it.