All Projects → silentworks → modx-devops

silentworks / modx-devops

Licence: other
Latest MODX Dev from Github

Programming Languages

Puppet
460 projects
ruby
36898 projects - #4 most used programming language
shell
77523 projects

modx-devops

Easily setup a local development environment for MODX using a Vagrant. You'll be able to run MODX sites as well as have the new toolkit needed to contribute to the MODX Manager using the new Manager Contribution Workflow.

The aim of this repository is to serve as an alternative to the official setup which requires installing dependencies at the system level.

This setup bundles all dependencies into a Vagrant (VirtualBox) providing you with a Vagrant setup for MODX with Apache, PHP, MySQL and xdebug. This allows you to contribute to the Manager UI, which currently uses Grunt build tool along with Sass and a few other third party libraries.

Install Dependencies

Once you have these two setup, you can proceed to the next steps.

Setup

1. Fetch Source

First, clone a copy of this git repo by running:

git clone git://github.com/silentworks/modx-devops.git

2. Update Vagrantfile

Open this project in your favourite TextEditor/IDE, then edit the Vagrantfile, change repo to your fork of the MODX repository. This step is necessary in order to send in Pull Requests.

Windows users only, OSX users skip to step 3.

We are making use of symlink in the project because of the way Grunt works, in order to get this to work on Windows you will need to do some extra steps first.

You will need to open your cmd prompt in Administrator mode and run the following:

fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

3. Create Vagrant Environment

Simply spin up a vagrant instance:

cd modx-devops
vagrant up

Note: vagrant up can take several minutes to initially complete. This is estimated to 2 - 10 minutes.

4. Install MODX

You can now navigate to http://192.168.33.121/setup/ in your web browser.

Database Info

  • username: vagrant
  • password: vagrant
  • database name: default

5. Use SSH

ssh into the box so you can use things like the grunt workflow commands.

vagrant ssh
cd /vagrant/www/_build/templates/default

Now lets get Bower dependencies:

grunt build

Now lets start watching the filesystem for changes

grunt

Note: grunt is now watching files for changes. When Sass files are changed CSS will automatically be generated.
Install the LiveReload browser extension to inject CSS changes without a page refresh.

And thats it, go on and edit your SASS files and watch grunt run each time you make a save.

PHPMyAdmin

You can access your database through PHPMyAdmin using the url below:

http://192.168.33.121:8000

Vagrant related info

To completely shutdown the vagrant box:

vagrant destroy

To keep the current state of the vagrant box but stop it from using your processor resources:

vagrant suspend

If you make changes to the Vagrantfile while the vagrant box is active you will need to do:

vagrant reload

for the changes to take effect.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].