Skip to content

Commit

Permalink
update to ruby 2.7, change node install to workaround legacy OS issue…
Browse files Browse the repository at this point in the history
…s, remove chromedriver due to legacy os issues, update postgres version
  • Loading branch information
nevinsm committed May 31, 2024
1 parent 115c43f commit b2973f1
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 215 deletions.
44 changes: 24 additions & 20 deletions .docker-config/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
FROM ruby:2.5.1
FROM ruby:2.7.2

RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
RUN wget https://dl.yarnpkg.com/debian/pubkey.gpg
RUN curl https://deb.nodesource.com/setup_14.x | bash
RUN cat pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && \
apt-get install -qq -y build-essential libpq-dev \
postgresql-client nodejs yarn \
wget xvfb unzip && \
rm -rf /var/lib/apt/lists/*

ENV BUNDLER_VERSION='1.17.3'
RUN gem install bundler:1.17.3
# remove pubkey
RUN rm pubkey.gpg

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | \
apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> \
/etc/apt/sources.list.d/google.list && \
apt-get update -y && \
apt-get install -y google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
ENV BUNDLER_VERSION='2.4.13'
RUN gem install bundler:2.4.13

# RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | \
# apt-key add - && \
# echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> \
# /etc/apt/sources.list.d/google.list && \
# apt-get update -y && \
# apt-get install -y google-chrome-stable && \
# rm -rf /var/lib/apt/lists/*

ENV CHROMEDRIVER_VERSION 2.19
ENV CHROMEDRIVER_DIR /chromedriver
# ENV CHROMEDRIVER_VERSION 2.19
# ENV CHROMEDRIVER_DIR /chromedriver

RUN mkdir $CHROMEDRIVER_DIR && \
wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" && \
unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR
# RUN mkdir $CHROMEDRIVER_DIR && \
# wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" && \
# unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR

ENV PATH $CHROMEDRIVER_DIR:$PATH
# ENV PATH $CHROMEDRIVER_DIR:$PATH

WORKDIR /usr/src/app
2 changes: 1 addition & 1 deletion .docker-config/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
rm -rf /usr/src/app/tmp/pids

# Verify node_modules are up to date
yarn install --silent
# yarn install --silent

# Verify gems are up to date
if ! bundle check > /dev/null; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

services:
postgres:
image: postgres:10.1-alpine
image: postgres:14.12-alpine
env:
POSTGRES_USER: root
POSTGRES_DB: adventure-time_test
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up ruby 2.5.1
- name: Set up ruby 2.7.2
uses: ruby/setup-ruby@v1

- name: Set up Ruby dependencies
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1
2.7.2
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruby 2.5.1
ruby 2.7.2
nodejs 14.17.0
yarn 1.22.19
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.1'
ruby '2.7.2'

gem 'awesome_print'
gem 'bcrypt'
Expand Down
Loading

0 comments on commit b2973f1

Please sign in to comment.