Django site updater

30 views
Skip to first unread message

kooliah

unread,
May 22, 2012, 4:17:48 PM5/22/12
to django...@googlegroups.com
I'm working on a new site and i have often the need to update the server
to let other people see the progress.
I tought to do a python script that compare the file structure/date/time
of my local version with the server version and update only the
changed/new files.
Before starting, and according to the DRY principle :-), I would like to
know if there is already something like that.

Aaron C. de Bruyn

unread,
May 22, 2012, 4:27:04 PM5/22/12
to django...@googlegroups.com
Sounds like you might benefit from Fabric.
Fabric lets you define a repeatable process (in Python) for deploying
your website to a server.

-A
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

Kurtis Mullins

unread,
May 22, 2012, 5:05:22 PM5/22/12
to django...@googlegroups.com
We use a versioning system (Subversion to be precise, git or mercurial
would probably be better for you). Then I commit everything to the
main repository and just checkout (update after the initial checkout)
on the development server. It's not too bad of a system although I
still have to go onto the server and type in "svn update" all of the
time (plus /etc/init.d/uwsgi restart since I run it behind nginx)

Tanuva

unread,
May 22, 2012, 4:31:04 PM5/22/12
to django...@googlegroups.com
You could checkout your project from the repository onto the server -
assuming you are using version control. Alternatively, you might like rsync.

Marcel

bruno desthuilliers

unread,
May 23, 2012, 5:01:32 AM5/23/12
to Django users
git (or whatever versioning system you're using) + South for schema
migrations + virtualenv / pip for depencies + a simple shell script on
the server to update the whole damn thing and restart services
(Apache, whatever). You can even have the script run by a cron job so
the server is updated every night.


Alexis Bellido

unread,
May 23, 2012, 2:36:12 PM5/23/12
to django...@googlegroups.com
I use Fabric to automate as much as possible, not only for production but also for my development and staging environments.

I have shared some code in github:


I'm currently finishing some changes for making this code more flexible and working with Django 1.4, where the project's directory layout has changed a bit.

Mike Dewhirst

unread,
May 23, 2012, 9:17:09 PM5/23/12
to django...@googlegroups.com
I use buildbot to export the code from svn whenever I commit to trunk.
It also performs other related tasks such as deleting the entire site
first then running tests, compiling to .pyc, deleting source, chowning
and chmoding etc.

I really like buildbot because you can add programmed (in Python) steps
to do anything you like.
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/VNxGjGEVV90J.

kooliah

unread,
May 26, 2012, 6:22:33 AM5/26/12
to django...@googlegroups.com
Tahnk you to everyone, i solved using git.
I made a remote git repository on the server to which i commit and push
from local, then I open a ssh session and pull/fetch to deploing folder

Thanks again
Reply all
Reply to author
Forward
0 new messages