lumi-api/entrypoint.sh

25 lines
428 B
Bash
Raw Permalink Normal View History

2019-04-06 19:46:19 +00:00
#!/bin/sh
set -e
export RAILS_ENV=production
case $1 in
api)
cd /srv/http
bundle exec rake db:migrate
bundle exec rake db:seed
bundle exec puma -d config.ru
exit $?
;;
2019-04-06 20:41:44 +00:00
darkhttpd)
darkhttpd /srv/http/public \
--no-server-id \
--pidfile /tmp/darkhttpd.pid \
--uid darkhttpd \
--gid www-data \
--no-listing \
--daemon \
--port 8080
exit $?
;;
2019-04-06 19:46:19 +00:00
esac