简体   繁体   中英

update openshift git repository after changes are made by client

I have a php app on openshift with mysql and manage it through git. I can easily add photos to my local clone and push it up to git and it works fine. But when a client uploads a photo through my site, to the openshift server, that uploaded photo (via php $_FILE) doesn't get pushed into the git repo and when I pull git repo to my local machine I can't find that uploaded photo. Any workaround?

I'm assuming that those photo's are being stored in your $OPENSHIFT_DATA_DIR which by default isn't tracked in your git repo. I would suggest setting up a rsync cron job that will sync any new files from your $OPENSHIFT_DATA_DIR to your local machine.

Something like:
rsync -raz --progress /var/www openshift_ssh_information:~/app-root/data/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM