Question

Photo of Nate Hoffman

0

Development and Production Servers

Does anyone have a methodology for having development and production servers and migrating the page and block structures between them? My understanding is that the page and block structure is stored in the database, so while developing on our development server how would we go about "pushing" the page and block changes to our production server? We are just trying to come up with a plan as we begin developing a web site completely run off of Rock's CMS.

  • Photo of Nick Airdo

    0

    While the blocks themselves are stored on the filesystem and can simply be pushed over to the production server, any configuration settings for them on particular pages, as well as all the page data is in the database so moving that data today has to be done via some form of a data-migration.  In the future, we would like a simple tool that can export (and import) a page, its children pages, and all the blocks associated with them.  In the mean time this is the approach we use at my church to handle this situation:

    1. We develop, configure, and test blocks and pages in our dev environment.
    2. Then we use the Rock\Dev Tools\Sql\CodeGen_PagesBlocksAttributesMigration_ForAPage.sql SQL script to generate the code needed for a migration.
    3. Then we create a migration (as described in the chapter that was moved from the QuickStart tutorial to the upcoming 202 Ignition guide) which includes the stuff generated by the second step.  (The migration is either in a general project or in a project that's specific to some block-app functionality we're writing).
    4. Lastly, compile the project and deploy the DLL.

    For that last step, in our case, we check the code in to our Git repo and then we deploy *everything* via AppVeyor -- but that's out of scope for the answer to your question. I have a rough draft of a whitepaper that describes how we set up our environment, but it's not quite ready for distribution.)

     

  • Photo of Aaron Jones

    0

    We are looking to do the same thing so any guidance on the best approach would be great.