wpsh / wpsh-local

Create virtual development environment using Docker Compose inside Vagrant.
https://wpsh.org/local
MIT License
0 stars 0 forks source link
composer composer-package development-environment docker docker-compose vagrant wordpress

Local Development Environment

Build Status

Add this to any project with docker-compose.yaml to run the containers inside Vagrant. Useful for creating friendly development environments with beautiful hostnames (no port numbers) that don't require Docker on the host machine.

Requirements

We suggest using Homebrew to install the dependencies:

brew cask install virtualbox vagrant

Install

  1. Add this package to your project using Composer:

    composer require --dev wpsh/local
  2. Add Vagrantfile to the root of your project with the following contents:

    # Configure the hostname.
    Vagrant.configure(2) do |config|
      config.vm.hostname = 'wpsh-local'
    end
    
    load File.join(
      File.dirname(__FILE__),
      'vendor/wpsh/local/Vagrantfile'
    )

    where vendor/wpsh/local is the relative path to this packge.

  3. Create docker-compose.yaml in the root of your project to define the virtual environment.

Examples

Development

Travis CI lints all shell scripts in scripts/vagrant using shellcheck and Vagrantfile (and other Ruby files) using rubocop.

To Do

Credits

Created by Kaspars Dambis.

License

See the LICENSE file for license rights and limitations (MIT).