Hacker News new | ask | show | jobs
by codeinthehole 4940 days ago
One way is to use symlinks to link in your live build. Then your deployment process can upload your new codebase and run the migrations before switching the symlink so that you new codebase is being served.

Where I work, we have a templated Django project that has a fabfile to do this: https://github.com/tangentlabs/tangent-django-boilerplate

If you look in the deploy function (https://github.com/tangentlabs/tangent-django-boilerplate/bl...), you can see the flow is something like:

    def deploy():
        deploy_codebase()
        ...
        migrate()
        ...
        switch_symlink()
1 comments

This is a very creative solution. I like it.