diff --git a/frameworks/rails/Dockerfile b/frameworks/rails/Dockerfile index 85e624293..caa99f58b 100644 --- a/frameworks/rails/Dockerfile +++ b/frameworks/rails/Dockerfile @@ -21,9 +21,6 @@ RUN bundle install --jobs=$(nproc) COPY . . -EXPOSE 8080 +EXPOSE 8080 8081 -ENV THRUSTER_TARGET_PORT=8080 -ENV THRUSTER_LOG_REQUESTS=false - -CMD ["bin/thrust", "bin/rails", "s"] +CMD ["bin/rails", "server"] diff --git a/frameworks/rails/Gemfile b/frameworks/rails/Gemfile index cc909ec39..6fcea7fe5 100644 --- a/frameworks/rails/Gemfile +++ b/frameworks/rails/Gemfile @@ -5,4 +5,3 @@ gem 'puma', '~> 7.2' gem 'pg', '~> 1.5' gem 'bootsnap', require: false gem 'connection_pool' -gem 'thruster', require: false diff --git a/frameworks/rails/Gemfile.lock b/frameworks/rails/Gemfile.lock index 8f3e6a90d..fd29f8b6f 100644 --- a/frameworks/rails/Gemfile.lock +++ b/frameworks/rails/Gemfile.lock @@ -188,8 +188,6 @@ GEM securerandom (0.4.1) stringio (3.2.0) thor (1.5.0) - thruster (0.1.20-arm64-darwin) - thruster (0.1.20-x86_64-linux) timeout (0.6.1) tsort (0.2.0) tzinfo (2.0.6) @@ -212,7 +210,6 @@ DEPENDENCIES pg (~> 1.5) puma (~> 7.2) rails (~> 8.0) - thruster CHECKSUMS action_text-trix (2.1.18) sha256=3fdb83f8bff4145d098be283cdd47ac41caf5110bfa6df4695ed7127d7fb3642 @@ -279,8 +276,6 @@ CHECKSUMS securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1 stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1 thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 - thruster (0.1.20-arm64-darwin) sha256=630cf8c273f562063b92ea5ccd7a721d7ba6130cc422c823727f4744f6d0770e - thruster (0.1.20-x86_64-linux) sha256=d579f252bf67aee6ba6d957e48f566b72e019d7657ba2f267a5db1e4d91d2479 timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b diff --git a/frameworks/rails/bin/thrust b/frameworks/rails/bin/thrust deleted file mode 100755 index 36bde2d83..000000000 --- a/frameworks/rails/bin/thrust +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("thruster", "thrust") diff --git a/frameworks/rails/config/puma.rb b/frameworks/rails/config/puma.rb index 65ad56d1c..296826d44 100644 --- a/frameworks/rails/config/puma.rb +++ b/frameworks/rails/config/puma.rb @@ -1,7 +1,10 @@ thread_count = ENV.fetch('RAILS_MAX_THREADS', 4).to_i threads thread_count, thread_count -port 8080 +tls_cert_path = ENV.fetch('TLS_CERT', '/certs/server.crt') +tls_key_path = ENV.fetch('TLS_KEY', '/certs/server.key') +bind "tcp://0.0.0.0:8080" +bind "ssl://0.0.0.0:8081?cert=#{tls_cert_path}&key=#{tls_key_path}" # Allow all HTTP methods so Rack middleware can return 405 instead of Puma returning 501 supported_http_methods :any diff --git a/frameworks/rails/meta.json b/frameworks/rails/meta.json index 7475c2f0d..0a98ed695 100644 --- a/frameworks/rails/meta.json +++ b/frameworks/rails/meta.json @@ -12,6 +12,7 @@ "limited-conn", "json", "json-comp", + "json-tls", "upload", "api-4", "api-16",