From 9d88fb22efb174e3ccdf3cf797d3f04f1ef10b2d Mon Sep 17 00:00:00 2001 From: Thomas Riboulet Date: Sat, 30 May 2020 14:40:37 +0200 Subject: [PATCH] update to use ruby 2.7.1 --- .drone.yml | 16 ++++++++++++++++ .tool-versions | 1 + Dockerfile | 22 ++++++++++++++++++---- Gemfile.lock | 44 +++++++++++++++++++++++++------------------- 4 files changed, 60 insertions(+), 23 deletions(-) create mode 100644 .drone.yml create mode 100644 .tool-versions diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ed57685 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,16 @@ +kind: pipeline +name: default + +steps: +- name: build image + image: ruby:2.7.1-slim + commands: + - apt-get update -y && apt-get install -y curl build-essential + - curl https://get.docker.io/builds/Linux/x86_64/docker-latest -o /usr/local/bin/docker + - chmod +x /usr/local/bin/docker + - gem install bundler:2.1.4 + - bundle config set deployment 'true' + - bundle config set without 'development test' + - bundle install + - make build_docker + - make push_docker diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..a9e31a4 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 2.7.1 diff --git a/Dockerfile b/Dockerfile index c848d0c..d2e010d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,28 @@ -FROM ruby:2.3.5-slim +FROM ruby:2.7.1-slim -RUN apt-get update && apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev curl libyaml-0-2 libxml2-dev libxslt-dev -#RUN apk --update add --virtual openssl-dev build-dependencies ruby-dev build-base +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + libffi-dev \ + libgdbm-dev \ + libncurses5-dev \ + libreadline-dev \ + libssl-dev \ + libyaml-dev \ + zlib1g-dev \ + curl \ + libyaml-0-2 \ + libxml2-dev \ + libxslt-dev # Set environment variables. ENV HOME /var/app ENV RACK_ENV production # Define working directory. ADD . /var/app -RUN cd /var/app; bundle install --without development test +RUN bundle config set deployment 'true' \ + && bundle config set without 'development test' +RUN cd /var/app; bundle install WORKDIR /var/app diff --git a/Gemfile.lock b/Gemfile.lock index d4d6a16..3f0b8f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,26 +1,32 @@ GEM remote: https://rubygems.org/ specs: - concurrent-ruby (1.0.5) - connection_pool (2.2.1) - haml (4.0.5) + connection_pool (2.2.2) + haml (5.1.2) + temple (>= 0.8.0) tilt - puma (2.11.1) - rack (>= 1.1, < 2.0) - rack (1.6.11) - rack-protection (1.5.5) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) + nio4r (2.5.2) + puma (4.3.5) + nio4r (~> 2.0) + rack (2.2.2) + rack-protection (2.0.8.1) rack - redis (4.0.1) - sidekiq (5.0.5) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) - rack-protection (>= 1.5.0) - redis (>= 3.3.4, < 5) - sinatra (1.4.4) - rack (~> 1.4) - rack-protection (~> 1.4) - tilt (~> 1.3, >= 1.3.4) - tilt (1.4.1) + redis (4.1.4) + ruby2_keywords (0.0.2) + sidekiq (6.0.7) + connection_pool (>= 2.2.2) + rack (~> 2.0) + rack-protection (>= 2.0.0) + redis (>= 4.1.0) + sinatra (2.0.8.1) + mustermann (~> 1.0) + rack (~> 2.0) + rack-protection (= 2.0.8.1) + tilt (~> 2.0) + temple (0.8.2) + tilt (2.0.10) PLATFORMS ruby @@ -32,4 +38,4 @@ DEPENDENCIES sinatra BUNDLED WITH - 1.16.0 + 2.1.4