Skip to content

Commit

Permalink
Merge branch 'develop' into handle_new_dial
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Jun 14, 2024
2 parents eec3eeb + 2b7a4b8 commit 76da840
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 171 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform 1.5.6
ruby 3.2.2
ruby 3.3.1
golang 1.22.1
2 changes: 1 addition & 1 deletion components/app/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.2.2
ruby 3.3.1
9 changes: 6 additions & 3 deletions components/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ruby:3.2-alpine AS build-env
ARG RUBY_VERSION=3.3
FROM public.ecr.aws/docker/library/ruby:$RUBY_VERSION-alpine AS build-image

ARG APP_ROOT="/app"
ENV BUNDLE_APP_CONFIG="/app/.bundle"
Expand All @@ -23,7 +24,7 @@ RUN mkdir -p tmp/pids
RUN rm -rf vendor/bundle/ruby/*/cache/ && find vendor/ -name "*.o" -delete && find vendor/ -name "*.c"


FROM ruby:3.2-alpine
FROM public.ecr.aws/docker/library/ruby:$RUBY_VERSION-alpine

ARG APP_ROOT="/app"
ENV BUNDLE_APP_CONFIG="/app/.bundle"
Expand All @@ -35,6 +36,8 @@ RUN apk update && \
apk add --update --no-cache build-base pcre-dev && \
gem install bundler

COPY --from=build-env $APP_ROOT $APP_ROOT
COPY --from=build-image $APP_ROOT $APP_ROOT

ENV RUBY_YJIT_ENABLE=true

CMD ["bundle", "exec", "ahn", "start", "--no-console"]
80 changes: 37 additions & 43 deletions components/app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.2)
activesupport (7.1.3.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -89,17 +89,17 @@ GEM
adhearsion-loquacious (1.9.3)
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.925.0)
aws-sdk-core (3.194.2)
aws-partitions (1.940.0)
aws-sdk-core (3.197.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-lambda (1.119.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sdk-lambda (1.121.0)
aws-sdk-core (~> 3, >= 3.197.0)
aws-sigv4 (~> 1.1)
aws-sdk-polly (1.84.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sdk-polly (1.86.0)
aws-sdk-core (~> 3, >= 3.197.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
Expand All @@ -108,7 +108,7 @@ GEM
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
base64 (0.2.0)
bigdecimal (3.1.7)
bigdecimal (3.1.8)
celluloid (0.18.0)
timers (~> 4)
celluloid-fsm (0.20.5)
Expand All @@ -124,7 +124,7 @@ GEM
coderay (1.1.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.1)
connection_pool (2.4.1)
countdownlatch (1.0.0)
crack (1.0.0)
Expand All @@ -139,7 +139,7 @@ GEM
drb (2.2.1)
equalizer (0.0.11)
eventmachine (1.2.7)
faraday (2.9.0)
faraday (2.9.1)
faraday-net_http (>= 2.0, < 3.2)
faraday-net_http (3.1.0)
net-http
Expand All @@ -160,7 +160,7 @@ GEM
domain_name (~> 0.5)
http-form_data (2.3.0)
http_parser.rb (0.8.0)
i18n (1.14.4)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jmespath (1.6.2)
Expand All @@ -175,8 +175,8 @@ GEM
logging (2.3.1)
little-plugger (~> 1.1)
multi_json (~> 1.14)
method_source (1.0.0)
minitest (5.22.3)
method_source (1.1.0)
minitest (5.23.1)
mock_redis (0.44.0)
multi_json (1.15.0)
mustermann (3.0.0)
Expand All @@ -186,25 +186,25 @@ GEM
uri
niceogiri (1.1.2)
nokogiri (~> 1.5)
nio4r (2.7.1)
nokogiri (1.16.4-arm-linux)
nio4r (2.7.3)
nokogiri (1.16.5-arm-linux)
racc (~> 1.4)
nokogiri (1.16.4-arm64-darwin)
nokogiri (1.16.5-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.4-x86_64-linux)
nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
okcomputer (1.18.5)
parallel (1.24.0)
parser (3.3.1.0)
parallel (1.25.1)
parser (3.3.3.0)
ast (~> 2.4.1)
racc
phony (2.20.12)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.4)
racc (1.7.3)
rack (3.0.10)
public_suffix (5.0.5)
racc (1.8.0)
rack (3.0.11)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
Expand All @@ -216,13 +216,14 @@ GEM
rack (>= 3)
webrick (~> 1.8)
rainbow (3.1.1)
rake (13.1.0)
rake (13.2.1)
redis (5.2.0)
redis-client (>= 0.22.0)
redis-client (0.22.1)
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.0)
rexml (3.2.6)
regexp_parser (2.9.2)
rexml (3.3.0)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -232,11 +233,11 @@ GEM
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.63.4)
rubocop (1.64.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -249,17 +250,13 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-minitest (0.35.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.24.0)
rubocop-rails (2.25.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
Expand All @@ -269,13 +266,8 @@ GEM
rubocop-minitest
rubocop-performance
rubocop-rails
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
ruby_ami (2.4.0)
Expand Down Expand Up @@ -311,13 +303,14 @@ GEM
skylight (6.0.4)
activesupport (>= 5.2.0)
state_machine (1.2.0)
strscan (3.1.0)
sucker_punch (3.2.0)
concurrent-ruby (~> 1.0)
thor (1.3.1)
thread_safe (0.3.6)
tilt (2.3.0)
timers (4.3.5)
twilio-ruby (7.0.2)
twilio-ruby (7.1.1)
faraday (>= 0.9, < 3.0)
jwt (>= 1.5, < 3.0)
nokogiri (>= 1.6, < 2.0)
Expand All @@ -331,7 +324,7 @@ GEM
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
webmock (3.23.0)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand All @@ -342,6 +335,7 @@ GEM

PLATFORMS
arm64-darwin-22
arm64-darwin-23
arm64-linux
x86_64-linux
x86_64-linux-musl
Expand Down Expand Up @@ -379,4 +373,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.5.6
2.5.11
2 changes: 1 addition & 1 deletion components/s3_mpeg/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.2.2
ruby 3.3.1
29 changes: 5 additions & 24 deletions components/s3_mpeg/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
# Adopted from https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-create-from-alt

# From: https://docs.aws.amazon.com/lambda/latest/dg/images-test.html#images-test-add
# To test an image without adding RIE to the image
#
# mkdir -p ~/.aws-lambda-rie && curl -Lo ~/.aws-lambda-rie/aws-lambda-rie \
# https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie \
# && chmod +x ~/.aws-lambda-rie/aws-lambda-rie
#
# For ARM:
#
# https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie-arm64
#
# Run the command
#
# docker run --rm -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 \
# --entrypoint /aws-lambda/aws-lambda-rie record_to_mp3:latest \
# /usr/local/bundle/bin/aws_lambda_ric app.App::Handler.process
#
# curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'

ARG FUNCTION_DIR="/app"

FROM ruby:3.2-alpine as build-image
ARG RUBY_VERSION=3.3
FROM public.ecr.aws/docker/library/ruby:$RUBY_VERSION-alpine AS build-image

RUN apk update && \
apk upgrade && \
Expand All @@ -48,7 +27,7 @@ COPY app.rb ${FUNCTION_DIR}

#############################

FROM ruby:3.2-alpine
FROM public.ecr.aws/docker/library/ruby:$RUBY_VERSION-alpine

ARG FUNCTION_DIR
WORKDIR ${FUNCTION_DIR}
Expand All @@ -62,5 +41,7 @@ RUN apk update && \
gem install bundler && \
gem install aws_lambda_ric

ENV RUBY_YJIT_ENABLE=true

ENTRYPOINT [ "/usr/local/bundle/bin/aws_lambda_ric" ]
CMD [ "app.App::Handler.process" ]
22 changes: 12 additions & 10 deletions components/s3_mpeg/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ GEM
remote: https://rubygems.org/
specs:
aws-eventstream (1.3.0)
aws-partitions (1.925.0)
aws-sdk-core (3.194.1)
aws-partitions (1.944.0)
aws-sdk-core (3.197.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.80.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sdk-kms (1.83.0)
aws-sdk-core (~> 3, >= 3.197.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.149.1)
aws-sdk-core (~> 3, >= 3.194.0)
aws-sdk-s3 (1.152.2)
aws-sdk-core (~> 3, >= 3.197.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
Expand All @@ -21,7 +21,8 @@ GEM
docile (1.4.0)
jmespath (1.6.2)
ox (2.14.18)
rexml (3.2.5)
rexml (3.2.8)
strscan (>= 3.0.9)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -31,10 +32,10 @@ GEM
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.0)
rspec-support (3.13.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -44,6 +45,7 @@ GEM
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)

PLATFORMS
ruby
Expand All @@ -56,4 +58,4 @@ DEPENDENCIES
simplecov-cobertura

BUNDLED WITH
2.4.12
2.5.11
2 changes: 1 addition & 1 deletion components/services/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.2.2
ruby 3.3.1
8 changes: 5 additions & 3 deletions components/services/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG FUNCTION_DIR="/function"

FROM ruby:3.2-alpine as build-image
ARG RUBY_VERSION=3.3
FROM public.ecr.aws/docker/library/ruby:$RUBY_VERSION-alpine AS build-image

RUN apk update && \
apk upgrade && \
Expand Down Expand Up @@ -30,7 +30,7 @@ COPY lib/ ${FUNCTION_DIR}/lib/

#############################

FROM ruby:3.2-alpine
FROM public.ecr.aws/docker/library/ruby:$RUBY_VERSION-alpine

ARG FUNCTION_DIR
WORKDIR ${FUNCTION_DIR}
Expand All @@ -44,5 +44,7 @@ RUN apk update && \
gem install bundler && \
gem install aws_lambda_ric

ENV RUBY_YJIT_ENABLE=true

ENTRYPOINT [ "/usr/local/bundle/bin/aws_lambda_ric" ]
CMD [ "app.App::Handler.process" ]
Loading

0 comments on commit 76da840

Please sign in to comment.