This project is read-only.

Best Practice for Content deployment?

Topics: Installing Orchard
Sep 26, 2013 at 9:29 AM
We're trying to incorporate the build of an Orchard website into an automatic deployment process. The code we've sorted already.

What methods do people use to ensure content is also replicated?

My understanding is that the "Media" directory and the database will need to be included in any deployment of the website to a new instance.
Do you keep "Media" under source control?
Do you backup your database and restore it? Or do you have a tool that migrates data from once instance to another?
Have any of you included these steps as part of an automatic process?

All comments / suggestions gratefully received!
Sep 26, 2013 at 2:04 PM
It all depends on scenario, your current environment setup et al. Are you deploying a single site from your code, or multiple ones
  1. Media - depends what you have there. As it's used for things that change at runtime, I usually ignore this folder during deployment and never put there anything that would be required by the deployed code (do there is no module dependent on the contents of this folder). Otherwise there would ba a painful problem of syncing changes from VCS with runtime ones.
  2. What do you mean by migrating changes from one instance to another? Backup should always be done first before deployment, but the update is up to migrations.
Sep 26, 2013 at 2:16 PM
I'm thinking along the lines of a Development pipeline.

We have a team of developers any of whom could be asked to work on any of our clients websites at any time.
So, a developer receives a change request.
He downloads the latest code / theme from source control to his local machine (*)
He uses his development environment to make the necessary changes locally.
The changes are then committed to source control and deployed to a "stage" site which the client can access.
The client may want more / different changes, so multiple deployments to stage are commonplace.
The client signs off the stage site and we then need to deploy the changes to live.

A code-only / theme deployment is usually fine for all deployments except for the first one.

For the first deployment the site will be built and populated by the client on a "stage" site until they are happy for it to go which point we need to duplicate the entire site to the live environment - code, media directory, database and all.

(* it would probably be helpful if when a developer gets the latest version of a site from source control they also get a "media" directory and a content database to go with it so their local copy isn't full of broken links and missing images)