setup.sh 559 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. sed -i 's|localhost|'"${DBHOST}"'|g' app.pl
  3. sed -i 's|user .*;|user '"$(id -u -n)"';|g' nginx.conf
  4. sed -i 's|server unix.*frameworks-benchmark.sock;|server unix:'"${TROOT}"'/frameworks-benchmark.sock;|g' nginx.conf
  5. fw_depends perl nginx
  6. cpanm --notest --no-man-page \
  7. Kelp \
  8. DBI \
  9. DBD::mysql \
  10. MongoDB \
  11. Kelp::Module::JSON::XS \
  12. HTML::Escape \
  13. HTTP::Parser::XS \
  14. Starman
  15. nginx -c ${TROOT}/nginx.conf
  16. plackup -E production -s Starman --workers=${MAX_THREADS} -l ${TROOT}/frameworks-benchmark.sock -a ./app.pl &