Dear Marc, thank so much for this detailed response, I will study these 
links and decide what to do. I am actually already live and went up under a 
lot of time pressure, but with a temporary site. So I guess I can still fix 
the process, but the right time for this is now before the site gets out of 
control. I really appreciate your advice on this and will check out fabric.
       with kind regards
            Sabine Maennel

Am Sonntag, 5. Oktober 2014 22:08:49 UTC+2 schrieb mark:
>
> Sabine,
>
> How I deploy a django app...ymmv and I won't say this is the best way to 
> do it....;)
>
> I have two machines - one for development (my laptop) and one for 
> production (a hosted site) on Linode. The development machine uses 
> virtualenv and runserver to test etc. The production machine uses 
> virtualenv, Apache, and mod_wsgi to serve the django pages.  I only use one 
> GIT repository for all my code. I use fabric to deploy to production from 
> git, or to revert to an older version if for some reason the new version 
> breaks something on the production machine. I save a few past versions on 
> the production server.
>
> I realize that the best approach is to test on something identical to your 
> production server, but I have not had any issues going from runserver 
> testing to mod_wsgi. I can always create a staging environment on my 
> development server that uses apache and mod_wsgi in a separate virtualenv 
> and stage a deployment there, but I haven't hit that particular problem, 
> yet. That is also why I made sure to test the fabric script for rolling 
> back to the previous version on the production server. If I hit a snag, I 
> just roll back and then work on the problem off line from the production 
> server. 
>
> Some references - 
> Django, Apache, mod_wsgi - 
> https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/
> Django and fabrik - https://django-fab-deploy.readthedocs.org/en/0.7.5/
>
> Google will also find many useful sites for deploying using fabric. It 
> took a little learning time to get it all to work (virtualenv, git, fabric, 
> mod_wsgi, django), but the end result was well worth the leaning time. When 
> I develop, test, and deploy I spend 99% of my time on the development and 
> test part of the process.
>
> Since Linode, as a production host, is only a virtual server, I had to 
> provide all the necessary files to make it all work together. 
>
> I am happy to provide more details, but since my process is a little 
> different from the one you outlined, I thought I would just give you an 
> outline at this point. Someone else may have a solution closer to the way 
> you seem to be going. All roads lead to Rome...just find the one that works 
> best for you.
>
> Mark
>
> P.S. I would recommend a lot of testing from development through 
> deployment before you actually go live. Make sure the process works end to 
> end...once you go live, there is no turning back! ;)
>
> On Sun, Oct 5, 2014 at 10:37 AM, Sabine Maennel <[email protected] 
> <javascript:>> wrote:
>
>> I have my site up and running for the first time, and it was hard to 
>> catch the deadline, but now I need to get to a more professional setup of 
>> things. 
>> Can anybody help me with this please:
>>
>> *So on my host I have two installations : Test and Live*
>> I guess that is fine, right?
>>
>> So now on bitbucket I just opened a repository for the deployment. I 
>> remeber my hoster telling me I should do that.
>>
>> Then I have a second repository for development on Bitbucket. 
>>
>> Do I need anything else? Is that the right approach. How will be the 
>> workflow from deployment through testing into the live site.
>>
>> Let me guess. 
>> If I want to take something live: it would be the following steps:
>> commit in my development repository
>>
>> copy the changes in my live repository, 
>> send it to the testing area, 
>> test 
>> commit the live repository when the new version is okay and put it live 
>> at the same time
>>
>> Do test and live have different wsgi files or the same? 
>> Do I provide the wsgi files or does the hoster do that?
>> Do I use the same settings in both test and live environment?
>>
>> My hoster said I could directly deploy from bitbucket, but I do not know 
>> how. Do you have suggestions on this.
>>
>> Does that strategy sound right to you over all or am I missing something 
>> important here. 
>>
>> Thanks for all the help I got so far in this forum. I really appreciate 
>> this and will try to give back at a later time
>>
>> with kind regards 
>>      Sabine Maennel
>>  
>>  
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b38240ac-5791-485d-8fed-ec8a278026b6%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/b38240ac-5791-485d-8fed-ec8a278026b6%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/34772aa9-20d2-4f33-925d-ea6075bc69bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to