Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerize app #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ROLLBAR_POST_SERVER_ITEM_ACCESS_TOKEN=
ROLLBAR_POST_CLIENT_ITEM_ACCESS_TOKEN=
WEBAUTHN_ORIGIN=http://localhost:3000
DB_USER_PASSWORD=
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.2
3.1.0
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ruby:3.1.0
ARG precompileassets

RUN apt-get update && apt-get install -y curl gnupg

RUN apt-get -y update && \
apt-get install --fix-missing --no-install-recommends -qq -y \
build-essential \
vim \
wget gnupg \
git-all \
curl \
ssh \
libpq5 libpq-dev -y && \
wget -qO- https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs && \
wget -qO- 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 && \
apt-get install yarn && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN gem install bundler
#Install gems
RUN mkdir /gems
WORKDIR /gems
COPY Gemfile .
COPY Gemfile.lock .
COPY .ruby-version .
COPY package.json .
RUN bundle install
RUN yarn install

ARG INSTALL_PATH=/opt/webauthnrailsdemo
ENV INSTALL_PATH $INSTALL_PATH
WORKDIR $INSTALL_PATH
COPY . .

RUN scripts/potential_asset_precompile.sh $precompileassets
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby File.read(".ruby-version").strip

gem 'rails', "~> 6.0.6"
gem "webauthn", "~> 2.4.0"
gem "webauthn", "~> 2.5.2"

gem 'bootsnap', '~> 1.4', require: false
gem 'pg', '~> 1.1'
gem 'psych', '< 4.0.0'
gem 'puma', '~> 4.2'
gem "rollbar", "~> 2.16"
gem 'sassc-rails', '~> 2.0'
gem 'sass-rails'
gem 'sprockets', '4.2.0'
gem 'webpacker', '~> 5.0'

group :production do
Expand Down
98 changes: 53 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,29 @@ GEM
android_key_attestation (0.3.0)
ast (2.4.1)
awrence (1.2.1)
bindata (2.4.8)
bindata (2.4.14)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
bootsnap (1.15.0)
msgpack (~> 1.2)
brakeman (4.8.2)
builder (3.2.4)
bundler-audit (0.7.0.1)
bundler (>= 1.2.0, < 3)
thor (>= 0.18, < 2)
byebug (11.1.3)
capybara (3.33.0)
capybara (3.38.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cbor (0.5.9.6)
childprocess (3.0.0)
concurrent-ruby (1.1.6)
cose (1.2.0)
cose (1.3.0)
cbor (~> 0.5.9)
openssl-signature_algorithm (~> 1.0)
crass (1.0.6)
Expand All @@ -91,14 +92,14 @@ GEM
dotenv (= 2.7.6)
railties (>= 3.2)
erubi (1.9.0)
ffi (1.13.1)
ffi (1.15.5)
globalid (1.0.0)
activesupport (>= 5.0)
i18n (1.8.3)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
jwt (2.2.2)
listen (3.2.1)
jwt (2.6.0)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.6.0)
Expand All @@ -107,34 +108,38 @@ GEM
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
mini_portile2 (2.8.1)
minitest (5.16.3)
minitest-stub_any_instance (1.0.2)
msgpack (1.3.3)
msgpack (1.6.0)
nio4r (2.5.2)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
openssl (2.2.0)
openssl-signature_algorithm (1.1.1)
openssl (~> 2.0)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
openssl (3.0.2)
openssl-signature_algorithm (1.2.1)
openssl (> 2.0, < 3.1)
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
pg (1.2.3)
psych (3.3.4)
public_suffix (4.0.5)
puma (4.3.5)
puma (4.3.12)
nio4r (~> 2.0)
rack (2.2.3)
racc (1.6.2)
rack (2.2.5)
rack-host-redirect (1.3.0)
rack
rack-mini-profiler (2.0.2)
rack-mini-profiler (2.3.4)
rack (>= 1.2.0)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-test (2.0.2)
rack (>= 1.3)
rails (6.0.6)
actioncable (= 6.0.6)
actionmailbox (= 6.0.6)
Expand All @@ -161,14 +166,14 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
rainbow (3.1.1)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.7.1)
regexp_parser (2.6.1)
rexml (3.2.4)
rollbar (2.26.0)
rollbar (2.27.1)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
Expand All @@ -185,6 +190,8 @@ GEM
rubyzip (2.3.0)
safety_net_attestation (0.4.0)
jwt (~> 2.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
Expand All @@ -193,7 +200,6 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
securecompare (1.0.0)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
Expand All @@ -202,41 +208,41 @@ GEM
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.2)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
thor (1.0.1)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
tpm-key_attestation (0.10.0)
tilt (2.0.11)
tpm-key_attestation (0.11.0)
bindata (~> 2.4)
openssl (> 2.0, < 3.1)
openssl-signature_algorithm (~> 1.0)
tzinfo (1.2.7)
tzinfo (1.2.10)
thread_safe (~> 0.1)
unicode-display_width (1.6.1)
web-console (4.0.3)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webauthn (2.4.1)
webauthn (2.5.2)
android_key_attestation (~> 0.3.0)
awrence (~> 1.1)
bindata (~> 2.4)
cbor (~> 0.5.9)
cose (~> 1.1)
openssl (~> 2.0)
openssl (>= 2.2, < 3.1)
safety_net_attestation (~> 0.4.0)
securecompare (~> 1.0)
tpm-key_attestation (~> 0.10.0)
webdrivers (4.4.1)
tpm-key_attestation (~> 0.11.0)
webdrivers (4.7.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
selenium-webdriver (> 3.141, < 5.0)
webpacker (5.4.3)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
Expand All @@ -247,7 +253,7 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.3.1)
zeitwerk (2.6.6)

PLATFORMS
ruby
Expand All @@ -262,24 +268,26 @@ DEPENDENCIES
listen (~> 3.1)
minitest-stub_any_instance (~> 1.0)
pg (~> 1.1)
psych (< 4.0.0)
puma (~> 4.2)
rack-host-redirect (~> 1.3)
rack-mini-profiler (~> 2.0)
rails (~> 6.0.6)
rollbar (~> 2.16)
rubocop (~> 0.80.1)
rubocop-rails (~> 2.5.0)
sassc-rails (~> 2.0)
sass-rails
selenium-webdriver (~> 3.142)
spring (~> 2.1)
spring-watcher-listen (~> 2.0)
sprockets (= 4.2.0)
web-console (~> 4.0)
webauthn (~> 2.4.0)
webauthn (~> 2.5.2)
webdrivers (~> 4.1)
webpacker (~> 5.0)

RUBY VERSION
ruby 2.7.2p137
ruby 3.1.0p0

BUNDLED WITH
2.3.24
2 changes: 0 additions & 2 deletions Procfile

This file was deleted.

Loading