Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, I use the postactivate hook to set environment variables (for convenience) and connect to project-specific tmux session.

    export PROJECT=`cat $VIRTUAL_ENV/.project`
    export SRC=$PROJECT/src

    [ -z $TMUX ] && cdproject && envopen
Where envopen is my own script that launches tmux (basically tmux -f $TMUXCONF -L $ENVNAME attach -t $ENVNAME with a few checks).

This solution has a lot of flaws, though: it isn't robust and doesn't make sense for non-Python-based projects (my work is not limited to Django). In fact, I'm working on switching to dedicated VMs for my projects—looking for a nice solution currently. I suspect it may involve Vagrant, Docker, perhaps Chef.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: