2017 © Pedro Peláez
 

library cmsmove

CMSMove - automated CMS deployment.

image

sparkison/cmsmove

CMSMove - automated CMS deployment.

  • Friday, June 8, 2018
  • by sparkison
  • Repository
  • 1 Watchers
  • 3 Stars
  • 66 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 47 Versions
  • 5 % Grown

The README.md

cmsmove

Automated deployment for popular content management systems, (*1)

Currently supported systems: - Craft CMS - versions 2 and 3. - ExpressionEngine (2 and 3) - Laravel 5.x - tested up to 5.8, currently still utilizes the laravel53 config command however. - WordPress, (*2)

We've been using extensively for the frameworks mentioned above. If you run into any issues please let us know so that we can get them fixed., (*3)

Requirements

  • Composer (_optional if you opt to use the pre-compiled phar file in the releases tab_)

Installation instructions

  1. Ensure that the ~/.composer/vendor/bin is available in your terminal PATH., (*4)

    1. sudo nano ~/.bash_profile
    2. Make sure you have a line similar to the following: export PATH="~/.composer/vendor/bin:$PATH"
  2. Require cmsmove globally by using this command:, (*5)

    composer global require sparkison/cmsmove, (*6)

  3. Change to a project directory, such as ~/Sites/mysite.dev, and run cmsmove config <framework> where <framework> is one of the configured CMS for cmsmove*, (*7)

*See Usage below for more information, (*8)

Usage

Getting started

After installing either the phar file or using the global composer install, ensure you can issue the cmsmove from the command line., (*9)

To use cmsmove you must first add a config file and an ignore file. To bootstrap these items, cd into your projects root working directory and issue: - cmsmove config <framework> where <framework> is one of the supported CMS systems - Currently support options for <framework> are craft, laravel53, wordpress, ee2 and ee3, (*10)

This will generate the required moveConfig.json and rsync.ignore files. The moveConfig.json file will contain all the needed variables for pushing and pulling. The rsync.ignore file will contain a list of files/folders to ignore. Add items to this list as needed., (*11)

Configure moveConfig.json

This is a JSON file use to get the needed variables for accessing the local installation and database as well the configured remote hosts, (*12)

Example config file:, (*13)

{
  "type": "craft",
  "mappings": {
    "app": "craft",
    "www": "public",
    "config": "config",
    "plugins": "plugins",
    "templates": "templates",
    "custom": {
      "uploads": {
        "type": "public",
        "directory": "uploads"
      },
      "assets": {
        "type": "public",
        "directory": "dist"
      }
    }
  },
  "environments": {
    "local": {
      "root": "/Users/MY_USER_NAME/Sites/mysite.dev",
      "db": "local_db_dev",
      "dbHost": "localhost",
      "dbUser": "root",
      "dbPass": "root",
      "dbPort": "3306"
    },
    "staging": {
      "host": "REMOTE HOST OR IP",
      "root" : "/home/user",
      "public": "public_html",
      "user": "SSH USER NAME",
      "password": "SSH PASSWORD",
      "keyfile": "SSH KEY FILE (takes precedence over the password field)",
      "port": "22",
      "db": "REMOTE DATABASE NAME",
      "dbHost": "localhost",
      "dbUser": "REMOTE DATABASE USER",
      "dbPass": "REMOTE DATABASE PASSWORD",
      "dbPort": "3306"
    },
    "production": {
      "host": "",
      "root" : "/home/mysite",
      "public": "public_html",
      "user": "",
      "password": "",
      "keyfile": "",
      "port": "22",
      "db": "",
      "dbHost": "localhost",
      "dbUser": "",
      "dbPass": "",
      "dbPort": "3306"
    }
  }
}
Configuration notes:

Required: The following fields are required: - type tells cmsmove what framework is being used. - mappings contains information for the local setup; this section is typically framework specific - app the application main folder - www the public folder - The rest of the items in this list are framework specific - environments the various environments (e.g. local, staging, production) - local this is the only required environment for accessing the local database, all other environments are optional, and can be named whatever you like, (*14)

App not above root: If the app and public folder are one in the same simply set mappings.www as an empty string, and set mappings.app as the public folder. Additionally, set the environments.<your_environment>.root to your remote host public folder and leave environments.<your_environment>.public as an empty string., (*15)

Adding custom directories for syncing: Within the mappings.custom array of the config file add a key => array mapping for your custom directory. The custom directory must contain two key/value pairs: type and directory., (*16)

Issuing cmsmove push staging custom will present you with a prompt of your configured custom directories to choose from E.g., (*17)

...
    "custom": {
      "uploads": {
        "type": "public",
        "directory": "uploads"
      },
      "assets": {
        "type": "public",
        "directory": "dist"
      }
    }
...

Using the example above, issuing cmsmove push staging custom will give a prompt similar to the following:, (*18)

[0] uploads
[1] assets
>

Entering 0 at the prompt would push the "uploads" directory from the local to the remote configured public directory. While entering 1 would push the assets directory. Additionally, you can specify a specific file as apposed to a directory using the following syntax:, (*19)

...
    "custom": {
      ...
      "env": {
        "type": "root",
        "file": "y",
        "directory": ".env"
      }
      ...
    }
...

Note that the file parameter just needs to be a "truthy" variable. For example "yes", "y" and "true" are all valid., (*20)

Updating

Simply issue the following command: composer global update sparkison/cmsmove To view the currently installed version issue: cmsmove --version, (*21)

Contributing

Pull requests, contributions, issues and feature requests are always welcome... Although I would prefer a pull request for new features... ;), (*22)

The Versions

08/06 2018

1.0.53

1.0.53.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

23/03 2018

dev-master

9999999-dev

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

21/06 2017

1.0.48

1.0.48.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

13/06 2017

1.0.47

1.0.47.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

23/05 2017

1.0.46

1.0.46.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

23/03 2017

1.0.45

1.0.45.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

23/03 2017

1.0.44

1.0.44.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

23/03 2017

1.0.43

1.0.43.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

17/03 2017

1.0.42

1.0.42.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment laravelphp

28/02 2017

1.0.41

1.0.41.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

19/12 2016

1.0.40

1.0.40.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.39

1.0.39.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.38

1.0.38.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.37

1.0.37.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.36

1.0.36.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.35

1.0.35.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.34

1.0.34.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.33

1.0.33.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.32

1.0.32.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.31

1.0.31.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.29

1.0.29.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.30

1.0.30.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

14/12 2016

1.0.28

1.0.28.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

13/12 2016

1.0.26

1.0.26.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

13/12 2016

1.0.25

1.0.25.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

13/12 2016

1.0.24

1.0.24.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress laravel craft expressionengine craft cms cmsmove sparkison automated deployment

13/12 2016

1.0.23

1.0.23.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress craft expressionengine craft cms cmsmove sparkison automated deployment

13/12 2016

1.0.21

1.0.21.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress craft expressionengine craft cms cmsmove sparkison automated deployment

08/12 2016

1.0.20

1.0.20.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress craft expressionengine craft cms cmsmove sparkison automated deployment

08/12 2016

1.0.19

1.0.19.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress craft expressionengine craft cms cmsmove sparkison automated deployment

08/12 2016

1.0.18

1.0.18.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress craft expressionengine craft cms cmsmove sparkison automated deployment

08/12 2016

1.0.17

1.0.17.0

CMSMove - automated CMS deployment.

  Sources   Download

GPL

The Requires

 

wordpress craft expressionengine craft cms cmsmove sparkison automated deployment