1

I'm running Statamic a flat file system (database-less) CMS on Openshift.

The issue i'm having is that when i update the content on the server (i.e. using the CMS) the changes that are made to the flat files (i.e. the content) isn't committed to the git repo. So, when I push up new changes to the website from my local repo, I wind up writing over it each time there's a git push. If I do a git pull, I get nada because the remote server doesn't know about the changes (they haven't been committed yet)

What I need to be able to do is make a git commit to any changes that happen on the server. Sadly, his doesn't work. I tried SSH in and it has no idea that there's a git repo. Something to do with the build process that they use.

Ideally, I'd like to find a way to automatically commit the changes on the server so i can pull them down without SSH in to commit. But anything that gets the job done is a huge win at this point.

jon
  • 5,961
  • 8
  • 35
  • 43

1 Answers1

0

You need to store your flat-file databases in the ~/app-root/data directory instead of your repo directory. The repo directory gets removed on each git push. My recommendation would be to find out what the names and locations of the flat files are, and then symlink the directory that stores them to your $OPENSHIFT_DATA_DIR so they will not be affected on a git push. You can do this using an action hook like the WordPress cartridge does here: https://github.com/openshift/wordpress-example/blob/master/.openshift/action_hooks/deploy