sinatra-sequel-postgres-torquebox-jruby.dockerfile 412 B

1234567891011121314
  1. FROM jruby:9.1
  2. ADD ./ /sinatra-sequel
  3. WORKDIR /sinatra-sequel
  4. ENV THREAD_FACTOR=2
  5. RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
  6. ENV DBTYPE=postgresql
  7. EXPOSE 8080
  8. CMD export MAX_CONCURRENCY=$(( 2 * $(nproc) )) && bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production