setup.sh 619 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 mysql mongodb
  6. cpanm --notest --no-man-page \
  7. [email protected] \
  8. [email protected] \
  9. DBD::[email protected] \
  10. [email protected] \
  11. Kelp::Module::JSON::[email protected] \
  12. HTML::[email protected] \
  13. HTTP::Parser::[email protected] \
  14. [email protected]
  15. nginx -c ${TROOT}/nginx.conf
  16. plackup -E production -s Starman --workers=${CPU_COUNT} -l ${TROOT}/frameworks-benchmark.sock -a ./app.pl &