2. Who am I?!
Mark Hamstra
Founder & CEA at modmore
Freelance MODX Developer
Not me
Turbo
Bommel
3. Solving the Workflow
Introducing the project: MODX.today
Introducing the tools: Gitify & Git
Putting it together: designing a Workflow
Setting up automatic deployments
5. MODX.today
• Daily-ish posts about MODX
• Weekly newsletter / reading list
• Open source, looking for guest authors
• Launched April 22nd
• 5500+ pageviews, average time on site 2:25 min
15. Solving the Workflow
Introducing the project: MODX.today
Introducing the tools: Gitify & Git
Putting it together: designing a Workflow
Setting up automatic deployments
17. Gitify is not…
• A complete, all-in-one, drag-and-drop solution with
a fancy user interface with buttons and animations
• The only way to have a workflow in MODX
18. But, Gitify is…
• A useful addition to your toolkit
• Flexible to mix & match with other tools
• Built on top of Symfony2 Console
• Open source!
19. With Gitify, you can…
• easily create file representations of any object
• create a functional site from those files
• install MODX and packages
• create mysql backups (and restore them)
20. Installing Gitify
• Go to https://github.com/modmore/Gitify and follow the
instructions. Basically:
• $ git clone https://github.com/modmore/
Gitify.git Gitify
• $ cd Gitify
• $ composer install (or php composer.phar install)
• $ chmod +x Gitify
• Add Gitify to your $PATH - check the wiki
24. $ Gitify extract
• Looks at your .gitify configuration
to extract data from MODX,
which is written to files in your
data directory.
• Allows specifying any number of
partitions (directories/types) you
want extracted
26. • Reads the gitify directory, and
builds it into the MODX install
• —force flag clears all data first
• —skip-clear-cache flag allows
building without clearing cache
• —no-backup allows skipping
creating a backup with —force
• —no-cleanup allows skipping
cleaning up orphaned objects
$ Gitify build
27.
28. Build Magic
• Automatically resolves ID conflicts by analysing
existing and already built objects
• Cleans up orphaned objects from the database
• Still respects where conditions in .gitify
29. $ Gitify modx:install
• Downloads and installs a version
of MODX all from the command
line.
• [modx_version] argument lets
you define a version (e.g. 2.3.2-pl)
that will be installed.Without it,
the latest version will be grabbed.
30. $ Gitify package:install
• Downloads and installs a package
(extra) into the MODX installation.
• —all option will look at the .gitify file
and automatically install each of the
packages defined there.
• —interactive option allows to
interactively search and install packages
when used with —all.
• [package_name] argument accepts a
partial name of the package which it will
then try to find in the package provider.
31. $ Gitify backup
• Creates a backup of your MySQL
database using mysqldump
• [name] the filename for the
backup file
32. $ Gitify restore
• Restores a backup created with
Gitify backup.
• [file] If you know the filename,
you can pass it directly. Otherwise
you will get an interactive list of
the available backups that can be
restored.
33. Solving the Workflow
Introducing the project: MODX.today
Introducing the tools: Gitify & Git
Putting it together: designing a Workflow
Setting up automatic deployments
44. Solving the Workflow
Introducing the project: MODX.today
Introducing the tools: Gitify & Git
Putting it together: designing a Workflow
Setting up automatic deployments
45. Setting up a Site from Gitify
1. Clone the Repository, checkout proper branch
2. Install MODX (Gitify modx:install
[version])
3. Install defined packages (Gitify
package:install —all)
4. Build from files (Gitify build)
46. Updating a Site from Gitify
1. Pull in the latest version of the repository
2. Install defined packages (Gitify
install:package —all)
3. Build from files (Gitify build)
47. Handling Automatic Deploys (#1)
• Use a Github/Gitlab/Bitbucket webhook that requests
a PHP script like this:
<?php
`git fetch origin`;
`git reset --hard origin/production`;
`git pull origin production`;
`Gitify install:package —all`;
`Gitify build —force`;