Skip to content

Commit b3ec7d8

Browse files
committed
[roda] Enable json-tls
1 parent 9bb0b17 commit b3ec7d8

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

frameworks/roda/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ruby:4.0-slim
22

33
RUN apt-get update && \
4-
apt-get install -y --no-install-recommends build-essential libsqlite3-dev libjemalloc2 && \
4+
apt-get install -y --no-install-recommends build-essential libpq-dev libjemalloc2 && \
55
rm -rf /var/lib/apt/lists/*
66

77
# Use Jemalloc
@@ -21,6 +21,6 @@ RUN bundle install --jobs=$(nproc)
2121

2222
COPY . .
2323

24-
EXPOSE 8080
24+
EXPOSE 8080 8081
2525

2626
CMD ["bundle", "exec", "puma", "-C", "puma.rb"]

frameworks/roda/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"limited-conn",
1313
"json",
1414
"json-comp",
15+
"json-tls",
1516
"upload",
1617
"api-4",
1718
"api-16",

frameworks/roda/puma.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
threads ENV.fetch('MAX_THREADS', 4).to_i
22

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

58
# Allow all HTTP methods so unknown ones reach Rack middleware (returned as 405)
69
supported_http_methods :any

0 commit comments

Comments
 (0)