Skip to content

Commit 84a9e5f

Browse files
committed
[rails] Enable json-tls test
1 parent 50687fa commit 84a9e5f

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

frameworks/rails/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ RUN bundle install --jobs=$(nproc)
2020

2121
COPY . .
2222

23-
EXPOSE 8080
23+
EXPOSE 8080 8081
2424

2525
ENV THRUSTER_TARGET_PORT=8080
26+
ENV THRUSTER_HTTPS_PORT=8081
2627
ENV THRUSTER_LOG_REQUESTS=false
2728

2829
CMD ["thrust", "bin/rails", "s"]

frameworks/rails/config/puma.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
thread_count = ENV.fetch('RAILS_MAX_THREADS', 4).to_i
22
threads thread_count, thread_count
33

4-
port 8080
4+
tls_cert_path = ENV.fetch('TLS_CERT', '/certs/server.crt')
5+
tls_key_path = ENV.fetch('TLS_KEY', '/certs/server.key')
6+
bind "tcp://0.0.0.0:8080"
7+
bind "ssl://0.0.0.0:8081?cert=#{tls_cert_path}&key=#{tls_key_path}"
58

69
# Allow all HTTP methods so Rack middleware can return 405 instead of Puma returning 501
710
supported_http_methods :any

frameworks/rails/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
"limited-conn",
1414
"json",
1515
"json-comp",
16+
"json-tls",
1617
"upload",
1718
"api-4",
1819
"api-16",
1920
"async-db",
2021
"static"
2122
],
2223
"maintainers": []
23-
}
24+
}

0 commit comments

Comments
 (0)