Deploying to a server

edited March 2013 in Modules
Hi,

Wondered if anyone had any tips / or best practices with regards to deployment. I'd like to make updates on my local version of my site, and then have the database / any changed files automatically upload to my online server, so i don't need to ftp files / backup and transfer database files manually.

Any help would be appreciated!

Thanks,
Matt

Comments

  • edited 11:05PM
    We currently use Beanstalk for our hosted GIT repositories and they have a wonderful deployment feature that can be set to automatically or manually push files:
    http://support.beanstalkapp.com/customer/portal/articles/68162-what-are-beanstalk’s-deployment-tools-

    They also allow for pre and post deployment "hooks" which we use to push database changes through migrations:
    http://ellislab.com/codeigniter/user-guide/libraries/migration.html

    This is using the 1.0 beta which has more documentation on migrations with FUEL and an example in the user guide:
    https://github.com/daylightstudio/FUEL-CMS/tree/1.0
    https://github.com/daylightstudio/FUEL-CMS-User-Guide-Module

    For this to work, the "webhook_romote_ip" configuration parameter needs to be set to the following in your fuel/applications/config/MY_fuel.php file which are Beanstalk IP addresses.
    $config['webhook_romote_ip'] = '50.31.156.48 - 50.31.156.79';
    Then the hook is simply the following:
    http://mysite.com/fuel/migrate/latest
  • edited 11:05PM
    That's great, thanks. So are you able to make amends to your local version of the site - such as add new pages / make content changes, and allow for database changes on the server? (For example - user comments added to the blog.) How do you merge the two databases?

    With regards to Beanstalk, I'd like to play around with it, but would I then need to set up a hosting account with them? I think I'd prefer to stay with the hosting I already have, for now...and I've got all my files in an SVN repo locally - which I suppose I'd like to stay with for the time being as well, until I get the time to move files over to GIT.
  • edited 11:05PM
    Keeping track of different changes across different environments and syncing them is a tricky business. We use migrations mostly for schema changes and not necessarily for inserts/edit changes made in the CMS. We actually just created our own "Sync" module and are in the midst of testing it. The module will pull asset and database files from a remote location and sync them with your assets and local database tables. For example, a client may make changes on the production server that you would like synced up locally (e.g. added content in the CMS or asset files). We use the Sync module to pull down asset and database changes from the production server to our local repository and then use GIT to push to our master branch and deploy to the production environment.
  • edited 11:05PM
    Really appreciate your help, thanks. The sync module sounds like that would address issues I'm facing - will you be releasing it for others to use? Is there any way we can help with the testing / development process?
  • edited 11:05PM
    We may release it but are unsure at the moment. I'll see about sending a version to you for testing.
  • edited 11:05PM
    Hi,
    Was wondering if there was any news on your synch script? Still keen to try it out!
    Thanks
    Matt
  • edited September 2013
    Here you go... just posted it on GitHUB... let me know if you have any issues:
    https://github.com/daylightstudio/FUEL-CMS-Sync-Module
    http://docs.getfuelcms.com/modules/sync
  • edited September 2015
    ok, it's been a while - sorry about that (taken a while to migrate to the new updates to fuel cms) - and I'm now taking a look at the sync module. I'm not sure what the parameters should be to connect to my production server db. It looks like I can pull down zipped assets, but it errors out on data. Was wondering if you had any code examples with sample values? thanks
  • edited 11:05PM
    What's the error you are seeing and how big is the database?
Sign In or Register to comment.