Setting up pyramid and mongodb on webfaction

Jump to: navigation, search


  1. setup custom app (listen on port) named mongodb at webfaction pannel.
  2. download numactl. install it to local dir.
  3. download the 64-bit mongodb at, tar and move the conetent to the $HOME/mongodb/; cd $HOME/mongodb/
  4. $ mkdir data
  5. $ vi mongo.conf; set port allocated at the custom app. and dbpath to the data dir
  • vi bin/start
export LD_LIBRARY_PATH=$HOME/lib64 && nohup numactl --interleave=all $PREFIX/bin/mongod \
--config=$PREFIX/mongo.conf 2>/dev/null 1>/dev/null &
  • vi bin/stop
kill -2 `cat $PREFIX/data/mongod.lock`
  • vi bin/restart
sleep 3
  • $ crontab -e; add start to crontab


  1. setup pyramid app at webfaction pannel. This will give you a virtualenv and internal port number. If you will change the default application, beaware to listen on the same port.
  2. create a git --bare repo at myapp
  • vi myapp/.git/hooks/post-receive
GIT_WORK_TREE=$HOME/webapps/pyramid_app/myapp git checkout -f
  1. Clone it back. Now if you push to the server, it will automatically load and restart the app


blog comments powered by Disqus