setup_redis.sh 484 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. sed -i 's|host=.*)|host="'$DBHOST'")|g' model_redis.nim
  3. fw_depends nim nimble zeromq mongrel2 nawak
  4. echo "** Compiling app"
  5. nim c --threads:on -d:release -d:redis_model -l:-Wl,-rpath,$IROOT/zeromq-4.0.3/lib -o:nawak_redis app.nim
  6. echo "** Starting mongrel2"
  7. cd conf
  8. mkdir -p run logs tmp
  9. m2sh load -config mongrel2.conf
  10. m2sh start -name test &
  11. cd ..
  12. nb_workers=256
  13. if [ "$TRAVIS" == "1" ]; then
  14. nb_workers=32
  15. fi
  16. echo "** Starting app"
  17. ./nawak_redis $nb_workers &