setup.sh 519 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. sed -i 's|host=127.0.0.1 port=5432|host='"${DBHOST}"' port=5432|g' model_postgre.nim
  3. fw_depends nim nimble zeromq mongrel2 nawak
  4. echo "** Compiling app"
  5. nim c --threads:on -d:release -d:postgre_model -l:-Wl,-rpath,$IROOT/zeromq-4.0.3/lib -o:nawak_postgre 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_postgre $nb_workers &