I don't know anything about openshift, maybe their community would be better help.
On Tue, Jul 12, 2016 at 2:45 PM, Tran <[email protected]> wrote: > Thanks for the prompt reply Stephen. > > I am using Openshift. Whenever the I deploy the apps, the static files > from the theme app will be copied to wsgi/static so wsgi/static will always > be overwritten. I found out that the images uploaded to the site (through > Mezzanine admin blog feature image) are also stored in that same folder > (the specific path is wsgi/static/media/uploads > ). Openshift has a git repo and will trigger a deployment whenever I push > a new change. I think the reason the uploaded files disappear is because > the local git doesn't have the static media uploaded by me while on > production server and that wsgi/static is overwritten every deployment. Do > you think there might be a way to store the uploaded media images so they > won't go away after a git push? > > I followed these guides to put mezzanine+django on Openshift > http://www.indjango.com/deploying-django-app-on-openshift/ > https://github.com/megatran/mezzanine-django-openshift > > > On Monday, July 11, 2016 at 11:24:54 PM UTC-5, Stephen McDonald wrote: > >> Not sure what you're doing deploy-wise to blow away images, but just >> wanted to assure you that unless you're running a very high traffic site, >> storing the static and media images on the same single server as the >> application should be fine. >> >> On Tue, Jul 12, 2016 at 2:19 PM, Tran <[email protected]> wrote: >> >>> Thanks Ben. Do you have recommendation as to where I should store static >>> media files so later when I make changes and "redeploy" the website, the >>> past contents (i.e: blog feature images) won't get deleted? From my >>> research I think aws s3 stands out the most and it seems possible to store >>> the media files on the same server as the website, too? >>> >>> On Sunday, July 10, 2016 at 12:22:04 AM UTC-5, Ben Havilland wrote: >>>> >>>> Hi Tran, the issue with doing this is that in any scalable environment >>>> you'll lose your files when nodes spin up/down. Media should be added >>>> after deployment, via upload. If you want the file to be persistent then >>>> you can put it in static (not media) files, do a `python manage.py >>>> collectstatic`. Static files can be added on your local server. Media >>>> files are volatile and should live elsewhere. Hope that helps. Ben >>>> >>>> On Sat, Jul 9, 2016 at 5:01 PM, Tran <[email protected]> wrote: >>>> >>>>> I am using blog with feature image enabled. Whenever I deploy the >>>>> application, the feature image that I uploaded disappear. I think the >>>>> reason is because I don't have the right setup for the static media (I >>>>> plan >>>>> to use the same server, not aws). Before I add the new change to the local >>>>> files, I do git pull (which always says the folder is up to date even >>>>> though I uploaded the img on the server). Anybody knows a good way to >>>>> correctly set up static media on the same server? Thanks >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Mezzanine Users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Mezzanine Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Stephen McDonald >> http://jupo.org >> > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
