How to contribute to DevShop
DevShop is a big project with a lot of git repositories, so we've made sure to include tools to make it easier.
Docker via Robo
We've implemented a RoboFile to allow us to use the Robo CLI to manage the development environment.
Visit http://robo.li for more information on Robo.
Dependencies
The only tools you need on your host machine to develop devshop are:
Git: Used to clone the source code.
PHP-CLI: Needed to run Drush.
Drush: Used to build the Drupal codebase on your host machine.
Docker version 1.10.0+.
Docker Compose version 1.6.0+.
Clone this Repo and change to it's directory.
Run
robo up
script to clone the rest of the source code and launch the docker containers.That's it! Look for a one-time login link that looks like:
The
docker logs
will remain open. Press CTRL-C to cancel out of the logs if you wish, the containers will still run.
Robo
Our Robofile.php has all the commands you need to manage a local development copy of DevShop:.
Once the robo CLI is installed, cd to the DevShop repo directory and run robo
to see a list of available commands.
Repos
DevShop consists of a number of code repositories.
"DevShop": Main Project
github.com/opendevshop/devshop
If you want to develop the server setup, the standalone install script, the documentation, or improve the Vagrantfile, fork this repo.
Contains:
DevShop install script: install.sh
Ansible playbooks: playbook.yml, roles folder.
Documentation
Vagrantfile
build-devmaster.make file: used to build the devshop front-end.
(Modify this file to use your fork of devmaster.)
"DevMaster": Drupal install profile for devshop front-end
github.com/opendevshop/devmaster
If you want to develop the front-end of devshop:
Fork this repo (https://github.com/opendevshop/devshop), and create your own branch for your feature or bugfix.
Edit build-devmaster.make file, and replace the devmaster url and branch with your forked repo url and branch like so:
See the ./source/devmaster-1.x/profiles/devmaster
folder for the fully built devmaster stack.
Debugging
The containers now contain XDEBUG that works for web requests and drush calls.
This is extremely helpful when working on tasks, which might be running in the backend.
To setup your IDE to listen for debug connections, use the following settings:
DGBp Proxy:
idekey: PHPSTORM
Host: 172.17.0.1
Port: 9000
In PHPStorm, this is in the Settings > PHP > Debug > DGBp Proxy page.
Don't forget to "Start Listening to PHP Debug Connections", get an XDEBUG plugin for your browser and enable it for devshop.local.computer, and to set a breakpoint or an error to see the debugger work.
If using PHPStorm, It will ask you to map files. You should map ./aegir-home to /var/aegir as "Absolute path on the server".
If your Docker machine IP is not 172.17.0.1, you can change it but you must also change a line in docker-compose.yml:
To detect what your machine's host IP is, you can run the following command from within the container:
Vagrant
The Vagrantfile in this project is now deprecated, but is still included in the vagrant
folder if you wish to use it.
It uses the install.sh file in this repo to provision the vagrant server.
This is the recommended install method for servers as well as vagrant boxes.
See Development with Vagrant for legacy instructions.
Help Improve Documentation
Think this can be improved? You can edit this file on GitHub and select "Create a new branch for this commit and start a pull request.".
Thanks!
Last updated