how sync modules work

edited September 2014 in Modules
can help explain the sync module in fuel?

Comments

  • edited 6:13PM
    The sync module is intended to bridge the gap of when after a site goes live and the CMS database and assets have changed (we are assuming that the normal FUEL PHP files are tracked and synced via GIT). The sync module has "remotes" configuration value found in the config/syncs.php file. Add your production and staging URLs in there. After you've pushed the sync module to those environments, then you can pull from those environments in the CMS. It is generally intended to be used only during development (so locally). It essentially takes a look at any assets and then downloads those missing from your local environment. This then allows you to add them to your GIT repository. The database also will replace your local database (with an option to backup first if the backup module is installed).
  • edited 6:13PM
    Actually i want to do another way round. With a hit og button, changes from develop goes live. I think file changes can done by using git, how about database, how to make them sync, how u deal such problem?
  • edited 6:13PM
    You could potentially do it from production as well by pulling from staging to production. The syncing of assets may take a while and you may need to increase memory and timeouts to do so since it does a CURL request to sync up images not in the environment.
  • edited 6:13PM
    How can i enable this module by the way
  • edited 6:13PM
    Steps to install:

    1. Download and unzip the contents.
    2. Rename the folder to "sync" and put it in the fuel/ folder
    3. Go to the command line and cd to your folder that your index.php file is and run the following:
    php index.php fuel/installer/install sync
    4. Copy the fuel/modules/config/sync.php config file and add it to the main fuel/application/config file. This will allow you to make changes to the config outside of the module.
    5. Add your production and staging URLs (if you have one), to the $config['sync']['remotes'] config value.
    6. Login to the CMS and you should see it in the CMS. The syncing won't work though until the sync module exists on your remote environments as well though.
  • edited 6:13PM
    Hi - just wanted to add, I was getting a load error, when trying to install that module -

    "An Error Was Encountered - The Encrypt library requires the Mcrypt extension."

    I'm testing using Mamp locally, and it was because the local version of PHP was being used, rather than the one that is included with Mamp.

    There's a solution to this here:
    http://stackoverflow.com/questions/4262006/how-to-use-mamps-version-of-php-instead-of-the-default-on-osx

    Hope that helps someone!
Sign In or Register to comment.