├── drkiq
├── log
│ └── .keep
├── tmp
│ └── .keep
├── lib
│ ├── assets
│ │ └── .keep
│ └── tasks
│ │ └── .keep
├── storage
│ └── .keep
├── test
│ ├── models
│ │ └── .keep
│ ├── system
│ │ └── .keep
│ ├── controllers
│ │ ├── .keep
│ │ └── pages_controller_test.rb
│ ├── helpers
│ │ └── .keep
│ ├── integration
│ │ └── .keep
│ ├── mailers
│ │ └── .keep
│ ├── fixtures
│ │ └── files
│ │ │ └── .keep
│ ├── jobs
│ │ └── counter_job_test.rb
│ ├── application_system_test_case.rb
│ ├── channels
│ │ └── application_cable
│ │ │ └── connection_test.rb
│ └── test_helper.rb
├── public
│ ├── favicon.ico
│ ├── apple-touch-icon.png
│ ├── apple-touch-icon-precomposed.png
│ ├── robots.txt
│ ├── 500.html
│ ├── 422.html
│ └── 404.html
├── app
│ ├── assets
│ │ ├── images
│ │ │ └── .keep
│ │ ├── config
│ │ │ └── manifest.js
│ │ └── stylesheets
│ │ │ └── application.css
│ ├── models
│ │ ├── concerns
│ │ │ └── .keep
│ │ └── application_record.rb
│ ├── controllers
│ │ ├── concerns
│ │ │ └── .keep
│ │ ├── application_controller.rb
│ │ └── pages_controller.rb
│ ├── views
│ │ ├── layouts
│ │ │ ├── mailer.text.erb
│ │ │ ├── mailer.html.erb
│ │ │ └── application.html.erb
│ │ └── pages
│ │ │ └── home.html.erb
│ ├── helpers
│ │ ├── pages_helper.rb
│ │ └── application_helper.rb
│ ├── channels
│ │ └── application_cable
│ │ │ ├── channel.rb
│ │ │ └── connection.rb
│ ├── jobs
│ │ ├── counter_job.rb
│ │ └── application_job.rb
│ └── mailers
│ │ └── application_mailer.rb
├── .ruby-version
├── bin
│ ├── rake
│ ├── rails
│ └── setup
├── config
│ ├── environment.rb
│ ├── boot.rb
│ ├── cable.yml
│ ├── initializers
│ │ ├── sidekiq.rb
│ │ ├── filter_parameter_logging.rb
│ │ ├── permissions_policy.rb
│ │ ├── assets.rb
│ │ ├── inflections.rb
│ │ └── content_security_policy.rb
│ ├── routes.rb
│ ├── credentials.yml.enc
│ ├── database.yml
│ ├── locales
│ │ └── en.yml
│ ├── storage.yml
│ ├── application.rb
│ ├── puma.rb
│ ├── environments
│ │ ├── test.rb
│ │ ├── development.rb
│ │ └── production.rb
│ └── unicorn.rb
├── config.ru
├── Rakefile
├── .gitattributes
├── db
│ ├── seeds.rb
│ └── schema.rb
├── README.md
├── .gitignore
├── Gemfile
└── Gemfile.lock
├── Dockerfile.nginx
├── Dockerfile.rails
├── reverse-proxy.conf
├── Dockerfile
├── Dockerfile.production
├── docker-compose.test.yml
├── LICENSE
├── docker-compose.yml
├── .gitignore
├── README.md
├── .semaphore
└── semaphore.yml
└── env-example
/drkiq/log/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/tmp/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/lib/assets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/lib/tasks/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/storage/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/test/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/test/system/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/test/controllers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/test/helpers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/test/integration/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/test/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/app/models/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/test/fixtures/files/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/.ruby-version:
--------------------------------------------------------------------------------
1 | ruby-3.1.2
2 |
--------------------------------------------------------------------------------
/drkiq/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/drkiq/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/drkiq/app/helpers/pages_helper.rb:
--------------------------------------------------------------------------------
1 | module PagesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/drkiq/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/drkiq/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../stylesheets .css
3 |
--------------------------------------------------------------------------------
/drkiq/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | end
3 |
--------------------------------------------------------------------------------
/drkiq/app/views/pages/home.html.erb:
--------------------------------------------------------------------------------
1 |
Pages#home
2 | The meaning of life is <%= @meaning_of_life %>
3 |
--------------------------------------------------------------------------------
/drkiq/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative "../config/boot"
3 | require "rake"
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/drkiq/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | primary_abstract_class
3 | end
4 |
--------------------------------------------------------------------------------
/drkiq/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/drkiq/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Channel < ActionCable::Channel::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/drkiq/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Connection < ActionCable::Connection::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/drkiq/app/jobs/counter_job.rb:
--------------------------------------------------------------------------------
1 | class CounterJob < ApplicationJob
2 | queue_as :default
3 |
4 | def perform(*args)
5 | 21 + 21
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/drkiq/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: "from@example.com"
3 | layout "mailer"
4 | end
5 |
--------------------------------------------------------------------------------
/drkiq/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path("../config/application", __dir__)
3 | require_relative "../config/boot"
4 | require "rails/commands"
5 |
--------------------------------------------------------------------------------
/drkiq/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative "application"
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/drkiq/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative "config/environment"
4 |
5 | run Rails.application
6 | Rails.application.load_server
7 |
--------------------------------------------------------------------------------
/drkiq/test/jobs/counter_job_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class CounterJobTest < ActiveJob::TestCase
4 | test "returns 42" do
5 | assert_equal 42, CounterJob.perform_now
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/drkiq/test/application_system_test_case.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5 | end
6 |
--------------------------------------------------------------------------------
/drkiq/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2 |
3 | require "bundler/setup" # Set up gems listed in the Gemfile.
4 | require "bootsnap/setup" # Speed up boot time by caching expensive operations.
5 |
--------------------------------------------------------------------------------
/drkiq/test/controllers/pages_controller_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class PagesControllerTest < ActionDispatch::IntegrationTest
4 | test "should get home" do
5 | get "/"
6 | assert_response :success
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/Dockerfile.nginx:
--------------------------------------------------------------------------------
1 | FROM nginx:latest
2 |
3 | RUN apt-get update && apt-get install -y curl vim
4 | COPY reverse-proxy.conf /etc/nginx/conf.d/reverse-proxy.conf
5 |
6 | EXPOSE 8020
7 | STOPSIGNAL SIGTERM
8 | CMD ["nginx", "-g", "daemon off;"]
9 |
--------------------------------------------------------------------------------
/drkiq/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: test
6 |
7 | production:
8 | adapter: redis
9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 | channel_prefix: drkiq_production
11 |
--------------------------------------------------------------------------------
/drkiq/config/initializers/sidekiq.rb:
--------------------------------------------------------------------------------
1 | sidekiq_config = { url: ENV['JOB_WORKER_URL'] }
2 |
3 | Sidekiq.configure_server do |config|
4 | config.redis = sidekiq_config
5 | end
6 |
7 | Sidekiq.configure_client do |config|
8 | config.redis = sidekiq_config
9 | end
--------------------------------------------------------------------------------
/drkiq/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative "config/application"
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/drkiq/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | #get 'pages/home'
3 | root 'pages#home'
4 | # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
5 |
6 | # Defines the root path route ("/")
7 | # root "articles#index"
8 | end
9 |
--------------------------------------------------------------------------------
/drkiq/.gitattributes:
--------------------------------------------------------------------------------
1 | # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2 |
3 | # Mark the database schema as having been generated.
4 | db/schema.rb linguist-generated
5 |
6 | # Mark any vendored files as having been vendored.
7 | vendor/* linguist-vendored
8 |
--------------------------------------------------------------------------------
/Dockerfile.rails:
--------------------------------------------------------------------------------
1 | FROM ruby:3.1.2 AS rails-toolbox
2 |
3 | # Default directory
4 | ENV INSTALL_PATH /opt/app
5 | RUN mkdir -p $INSTALL_PATH
6 |
7 | # Install rails
8 | RUN gem install rails bundler
9 | #RUN chown -R user:user /opt/app
10 | WORKDIR /opt/app
11 |
12 | # Run a shell
13 | CMD ["/bin/sh"]
14 |
--------------------------------------------------------------------------------
/reverse-proxy.conf:
--------------------------------------------------------------------------------
1 | # reverse-proxy.conf
2 |
3 | server {
4 | listen 8020;
5 | server_name example.org;
6 |
7 | location / {
8 | proxy_pass http://drkiq:8010;
9 | proxy_set_header Host $host;
10 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/drkiq/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 | # Automatically retry jobs that encountered a deadlock
3 | # retry_on ActiveRecord::Deadlocked
4 |
5 | # Most jobs are safe to ignore if the underlying records are no longer available
6 | # discard_on ActiveJob::DeserializationError
7 | end
8 |
--------------------------------------------------------------------------------
/drkiq/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/drkiq/test/channels/application_cable/connection_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase
4 | # test "connects with cookies" do
5 | # cookies.signed[:user_id] = 42
6 | #
7 | # connect
8 | #
9 | # assert_equal connection.user_id, "42"
10 | # end
11 | end
12 |
--------------------------------------------------------------------------------
/drkiq/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }])
7 | # Character.create(name: "Luke", movie: movies.first)
8 |
--------------------------------------------------------------------------------
/drkiq/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Drkiq
5 |
6 | <%= csrf_meta_tags %>
7 | <%= csp_meta_tag %>
8 |
9 | <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
10 |
11 |
12 |
13 | <%= yield %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/drkiq/app/controllers/pages_controller.rb:
--------------------------------------------------------------------------------
1 | class PagesController < ApplicationController
2 | def home
3 | # We are executing the job on the spot rather than in the background to
4 | # exercise using Sidekiq in a trivial example.
5 | #
6 | # Consult with the Rails documentation to learn more about Active Job:
7 | # http://edgeguides.rubyonrails.org/active_job_basics.html
8 | @meaning_of_life = CounterJob.perform_now
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/drkiq/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] ||= "test"
2 | require_relative "../config/environment"
3 | require "rails/test_help"
4 |
5 | class ActiveSupport::TestCase
6 | # Run tests in parallel with specified workers
7 | parallelize(workers: :number_of_processors)
8 |
9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
10 | fixtures :all
11 |
12 | # Add more helper methods to be used by all tests here...
13 | end
14 |
--------------------------------------------------------------------------------
/drkiq/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5 | # notations and behaviors.
6 | Rails.application.config.filter_parameters += [
7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8 | ]
9 |
--------------------------------------------------------------------------------
/drkiq/config/initializers/permissions_policy.rb:
--------------------------------------------------------------------------------
1 | # Define an application-wide HTTP permissions policy. For further
2 | # information see https://developers.google.com/web/updates/2018/06/feature-policy
3 | #
4 | # Rails.application.config.permissions_policy do |f|
5 | # f.camera :none
6 | # f.gyroscope :none
7 | # f.microphone :none
8 | # f.usb :none
9 | # f.fullscreen :self
10 | # f.payment :self, "https://secure.example.com"
11 | # end
12 |
--------------------------------------------------------------------------------
/drkiq/config/credentials.yml.enc:
--------------------------------------------------------------------------------
1 | 6J0dCnHTHYNddCrnIHpPDx79KCPk5+6W2siM9g+X3xQ2axTDWIfbMw3rLMbTWOyRC4NxqOHklBRTQ4AvFHZofWg8S7l/JBoPm9XW5ce18Ie8jefBbbNdZKKwRCu0CLSomLDH2P9khiPkxjT4HOeTw5Vrgw8MwHHgz2XC/3WYcHMwiQnPXfxxuIrHUjv2D9v7LLid6KKHlnm6eSREPmqsZwOYzRpr7H6ftO1E/T2N1oPZouxQEOg14nTswHhaJhLByi/f+fw/zpF7ST0obxGS07AjCv++73/UQ+q7ep3rJX1aPkwr0ez/p2chdunLrKJY162mkz1QE9I3JcCje5bpOZ2raNueV7KEbPI+IaX9WQ1rSUfd3K5JlGXFNEODpJeCjTIA3QXndvi5PZ70T25+r6HXlt1SjJoOXDfn--A2OZ/lmujIws0mWK--KaQlrn3omvRQ6m5IGp8z0g==
--------------------------------------------------------------------------------
/drkiq/README.md:
--------------------------------------------------------------------------------
1 | # README
2 |
3 | This README would normally document whatever steps are necessary to get the
4 | application up and running.
5 |
6 | Things you may want to cover:
7 |
8 | * Ruby version
9 |
10 | * System dependencies
11 |
12 | * Configuration
13 |
14 | * Database creation
15 |
16 | * Database initialization
17 |
18 | * How to run the test suite
19 |
20 | * Services (job queues, cache servers, search engines, etc.)
21 |
22 | * Deployment instructions
23 |
24 | * ...
25 |
--------------------------------------------------------------------------------
/drkiq/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = "1.0"
5 |
6 | # Add additional assets to the asset load path.
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in the app/assets
11 | # folder are already added.
12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
13 |
--------------------------------------------------------------------------------
/drkiq/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite. Versions 3.8.0 and up are supported.
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem "sqlite3"
6 | #
7 | default: &default
8 | adapter: sqlite3
9 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10 | timeout: 5000
11 |
12 | development:
13 | url: <%= ENV['DATABASE_URL'].gsub('?', '_development?') %>
14 |
15 | test:
16 | url: <%= ENV['DATABASE_URL'].gsub('?', '_test?') %>
17 |
18 | staging:
19 | url: <%= ENV['DATABASE_URL'].gsub('?', '_staging?') %>
20 |
21 | production:
22 | url: <%= ENV['DATABASE_URL'].gsub('?', '_production?') %>
--------------------------------------------------------------------------------
/drkiq/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, "\\1en"
8 | # inflect.singular /^(ox)en/i, "\\1"
9 | # inflect.irregular "person", "people"
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym "RESTful"
16 | # end
17 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # Dockerfile development version
2 | FROM ruby:3.1.2 AS drkiq-development
3 |
4 | # Install yarn
5 | RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg -o /root/yarn-pubkey.gpg && apt-key add /root/yarn-pubkey.gpg
6 | RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
7 | RUN apt-get update && apt-get install -y --no-install-recommends nodejs yarn
8 |
9 | # Default directory
10 | ENV INSTALL_PATH /opt/app
11 | RUN mkdir -p $INSTALL_PATH
12 |
13 | # Install gems
14 | WORKDIR $INSTALL_PATH
15 | COPY drkiq/ .
16 | RUN rm -rf node_modules vendor
17 | RUN gem install rails bundler
18 | RUN bundle install
19 | RUN yarn install
20 |
21 | # Start server
22 | CMD bundle exec unicorn -c config/unicorn.rb
23 |
24 |
--------------------------------------------------------------------------------
/Dockerfile.production:
--------------------------------------------------------------------------------
1 | # Dockerfile CI version
2 | FROM registry.semaphoreci.com/ruby:3.1
3 |
4 | # Default directory
5 | ENV INSTALL_PATH /opt/app
6 | RUN mkdir -p $INSTALL_PATH
7 |
8 | # Install Nodejs
9 | RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg -o /root/yarn-pubkey.gpg && apt-key add /root/yarn-pubkey.gpg
10 | RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
11 | RUN apt-get update && apt-get install -y --no-install-recommends nodejs yarn
12 |
13 | ENV INSTALL_PATH /opt/app
14 | RUN mkdir -p $INSTALL_PATH
15 |
16 | # Install gems
17 | WORKDIR $INSTALL_PATH
18 | COPY drkiq/ .
19 | RUN rm -rf node_modules vendor
20 | RUN gem install rails bundler
21 | RUN bundle install
22 | RUN yarn install
23 |
24 | CMD bundle exec unicorn -c config/unicorn.rb
25 |
--------------------------------------------------------------------------------
/drkiq/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6 | * vendor/assets/stylesheets directory can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any other CSS
10 | * files in this directory. Styles in this file should be added after the last require_* statement.
11 | * It is generally better to create a new file per style scope.
12 | *
13 | *= require_tree .
14 | *= require_self
15 | */
16 |
--------------------------------------------------------------------------------
/drkiq/db/schema.rb:
--------------------------------------------------------------------------------
1 | # This file is auto-generated from the current state of the database. Instead
2 | # of editing this file, please use the migrations feature of Active Record to
3 | # incrementally modify your database, and then regenerate this schema definition.
4 | #
5 | # This file is the source Rails uses to define your schema when running `bin/rails
6 | # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7 | # be faster and is potentially less error prone than running all of your
8 | # migrations from scratch. Old migrations may fail to apply correctly if those
9 | # migrations use external dependencies or application code.
10 | #
11 | # It's strongly recommended that you check this file into your version control system.
12 |
13 | ActiveRecord::Schema[7.0].define(version: 0) do
14 | # These are extensions that must be enabled in order to support this database
15 | enable_extension "plpgsql"
16 |
17 | end
18 |
--------------------------------------------------------------------------------
/drkiq/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile '~/.gitignore_global'
6 |
7 | # Ignore bundler config.
8 | /.bundle
9 |
10 | tmp/
11 | vendor/
12 |
13 | # Ignore the default SQLite database.
14 | /db/*.sqlite3
15 | /db/*.sqlite3-*
16 |
17 | # Ignore all logfiles and tempfiles.
18 | /log/*
19 | /tmp/*
20 | !/log/.keep
21 | !/tmp/.keep
22 |
23 | # Ignore pidfiles, but keep the directory.
24 | /tmp/pids/*
25 | !/tmp/pids/
26 | !/tmp/pids/.keep
27 |
28 | # Ignore uploaded files in development.
29 | /storage/*
30 | !/storage/.keep
31 | /tmp/storage/*
32 | !/tmp/storage/
33 | !/tmp/storage/.keep
34 |
35 | /public/assets
36 |
37 | # Ignore master key for decrypting credentials and more.
38 | /config/master.key
39 |
--------------------------------------------------------------------------------
/drkiq/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t "hello"
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t("hello") %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # The following keys must be escaped otherwise they will not be retrieved by
20 | # the default I18n backend:
21 | #
22 | # true, false, on, off, yes, no
23 | #
24 | # Instead, surround them with single quotes.
25 | #
26 | # en:
27 | # "true": "foo"
28 | #
29 | # To learn more, please read the Rails Internationalization guide
30 | # available at https://guides.rubyonrails.org/i18n.html.
31 |
32 | en:
33 | hello: "Hello world"
34 |
--------------------------------------------------------------------------------
/docker-compose.test.yml:
--------------------------------------------------------------------------------
1 | version: "3.9"
2 |
3 | services:
4 |
5 | postgres:
6 | image: postgres:14.2
7 | environment:
8 | POSTGRES_USER: drkiq
9 | POSTGRES_PASSWORD: test_db_password
10 | ports:
11 | - '5432:5432'
12 | volumes:
13 | - drkiq-postgres:/var/lib/postgresql/data
14 |
15 | redis:
16 | image: redis:7.0
17 | ports:
18 | - '6379:6379'
19 | volumes:
20 | - drkiq-redis:/var/lib/redis/data
21 |
22 | drkiq:
23 | image: $DOCKER_USERNAME/dockerizing-ruby-drkiq:latest
24 | links:
25 | - postgres
26 | - redis
27 | ports:
28 | - '8010:8010'
29 | env_file:
30 | - .env
31 |
32 | sidekiq:
33 | image: $DOCKER_USERNAME/dockerizing-ruby-drkiq:latest
34 | command: bundle exec sidekiq
35 | links:
36 | - postgres
37 | - redis
38 | env_file:
39 | - .env
40 |
41 | nginx:
42 | image: $DOCKER_USERNAME/dockerizing-ruby-nginx:latest
43 | links:
44 | - drkiq
45 | ports:
46 | - '8020:8020'
47 |
48 | volumes:
49 | drkiq-postgres:
50 | drkiq-redis:
51 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Rendered Text
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/drkiq/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require "fileutils"
3 |
4 | # path to your application root.
5 | APP_ROOT = File.expand_path("..", __dir__)
6 |
7 | def system!(*args)
8 | system(*args) || abort("\n== Command #{args} failed ==")
9 | end
10 |
11 | FileUtils.chdir APP_ROOT do
12 | # This script is a way to set up or update your development environment automatically.
13 | # This script is idempotent, so that you can run it at any time and get an expectable outcome.
14 | # Add necessary setup steps to this file.
15 |
16 | puts "== Installing dependencies =="
17 | system! "gem install bundler --conservative"
18 | system("bundle check") || system!("bundle install")
19 |
20 | # puts "\n== Copying sample files =="
21 | # unless File.exist?("config/database.yml")
22 | # FileUtils.cp "config/database.yml.sample", "config/database.yml"
23 | # end
24 |
25 | puts "\n== Preparing database =="
26 | system! "bin/rails db:prepare"
27 |
28 | puts "\n== Removing old logs and tempfiles =="
29 | system! "bin/rails log:clear tmp:clear"
30 |
31 | puts "\n== Restarting application server =="
32 | system! "bin/rails restart"
33 | end
34 |
--------------------------------------------------------------------------------
/drkiq/config/initializers/content_security_policy.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Define an application-wide content security policy
4 | # For further information see the following documentation
5 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6 |
7 | # Rails.application.configure do
8 | # config.content_security_policy do |policy|
9 | # policy.default_src :self, :https
10 | # policy.font_src :self, :https, :data
11 | # policy.img_src :self, :https, :data
12 | # policy.object_src :none
13 | # policy.script_src :self, :https
14 | # policy.style_src :self, :https
15 | # # Specify URI for violation reports
16 | # # policy.report_uri "/csp-violation-report-endpoint"
17 | # end
18 | #
19 | # # Generate session nonces for permitted importmap and inline scripts
20 | # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21 | # config.content_security_policy_nonce_directives = %w(script-src)
22 | #
23 | # # Report CSP violations to a specified URI. See:
24 | # # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
25 | # # config.content_security_policy_report_only = true
26 | # end
27 |
--------------------------------------------------------------------------------
/drkiq/config/storage.yml:
--------------------------------------------------------------------------------
1 | test:
2 | service: Disk
3 | root: <%= Rails.root.join("tmp/storage") %>
4 |
5 | local:
6 | service: Disk
7 | root: <%= Rails.root.join("storage") %>
8 |
9 | # Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10 | # amazon:
11 | # service: S3
12 | # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13 | # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14 | # region: us-east-1
15 | # bucket: your_own_bucket-<%= Rails.env %>
16 |
17 | # Remember not to checkin your GCS keyfile to a repository
18 | # google:
19 | # service: GCS
20 | # project: your_project
21 | # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22 | # bucket: your_own_bucket-<%= Rails.env %>
23 |
24 | # Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25 | # microsoft:
26 | # service: AzureStorage
27 | # storage_account_name: your_account_name
28 | # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29 | # container: your_container_name-<%= Rails.env %>
30 |
31 | # mirror:
32 | # service: Mirror
33 | # primary: local
34 | # mirrors: [ amazon, google, microsoft ]
35 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3.9"
2 |
3 | services:
4 |
5 | postgres:
6 | image: postgres:14.2
7 | environment:
8 | POSTGRES_USER: drkiq
9 | POSTGRES_PASSWORD: test_db_password
10 | ports:
11 | - '5432:5432'
12 | volumes:
13 | - drkiq-postgres:/var/lib/postgresql/data
14 |
15 | redis:
16 | image: redis:7.0
17 | ports:
18 | - '6379:6379'
19 | volumes:
20 | - drkiq-redis:/var/lib/redis/data
21 |
22 | drkiq:
23 | build:
24 | context: .
25 | #args:
26 | # USER_ID: "${USER_ID:-1000}"
27 | # GROUP_ID: "${GROUP_ID:-1000}"
28 | volumes:
29 | - ./drkiq:/opt/app
30 | links:
31 | - postgres
32 | - redis
33 | ports:
34 | - '8010:8010'
35 | env_file:
36 | - .env
37 |
38 | sidekiq:
39 | build:
40 | context: .
41 | #args:
42 | # USER_ID: "${USER_ID:-1000}"
43 | # GROUP_ID: "${GROUP_ID:-1000}"
44 | command: bundle exec sidekiq
45 | links:
46 | - postgres
47 | - redis
48 | env_file:
49 | - .env
50 |
51 | nginx:
52 | build:
53 | context: .
54 | dockerfile: ./Dockerfile.nginx
55 | links:
56 | - drkiq
57 | ports:
58 | - '8020:8020'
59 |
60 | volumes:
61 | drkiq-postgres:
62 | drkiq-redis:
63 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | .git
3 | .dockerignore
4 |
5 | *.gem
6 | *.rbc
7 | /.config
8 | /coverage/
9 | /InstalledFiles
10 | /pkg/
11 | /spec/reports/
12 | /spec/examples.txt
13 | /test/tmp/
14 | /test/version_tmp/
15 | /tmp/
16 | drkiq/vendor/bundle/
17 |
18 | # Used by dotenv library to load environment variables.
19 | # .env
20 |
21 | # Ignore Byebug command history file.
22 | .byebug_history
23 |
24 | ## Specific to RubyMotion:
25 | .dat*
26 | .repl_history
27 | build/
28 | *.bridgesupport
29 | build-iPhoneOS/
30 | build-iPhoneSimulator/
31 |
32 | ## Specific to RubyMotion (use of CocoaPods):
33 | #
34 | # We recommend against adding the Pods directory to your .gitignore. However
35 | # you should judge for yourself, the pros and cons are mentioned at:
36 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
37 | #
38 | # vendor/Pods/
39 |
40 | ## Documentation cache and generated files:
41 | /.yardoc/
42 | /_yardoc/
43 | /doc/
44 | /rdoc/
45 |
46 | ## Environment normalization:
47 | /.bundle/
48 | /vendor/bundle
49 | /lib/bundler/man/
50 |
51 | # for a library or gem, you might want to ignore these files since the code is
52 | # intended to run in multiple environments; otherwise, check them in:
53 | # Gemfile.lock
54 | # .ruby-version
55 | # .ruby-gemset
56 |
57 | # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
58 | .rvmrc
59 |
60 | # Used by RuboCop. Remote config files pulled in from inherit_from directive.
61 | # .rubocop-https?--*
62 |
--------------------------------------------------------------------------------
/drkiq/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative "boot"
2 |
3 | require "rails/all"
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module Drkiq
10 | class Application < Rails::Application
11 | # Initialize configuration defaults for originally generated Rails version.
12 | config.load_defaults 7.0
13 |
14 | # We want to set up a custom logger which logs to STDOUT.
15 | # Docker expects your application to log to STDOUT/STDERR and to be ran
16 | # in the foreground.
17 | config.log_level = :debug
18 | config.log_tags = [:subdomain, :uuid]
19 | config.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
20 |
21 | # Since we're using Redis for Sidekiq, we might as well use Redis to back
22 | # our cache store. This keeps our application stateless as well.
23 | config.cache_store = :redis_store, ENV['CACHE_URL'],
24 | { namespace: 'drkiq::cache' }
25 |
26 | # If you've never dealt with background workers before, this is the Rails
27 | # way to use them through Active Job. We just need to tell it to use Sidekiq.
28 | config.active_job.queue_adapter = :sidekiq
29 |
30 | # Configuration for the application, engines, and railties goes here.
31 | #
32 | # These settings can be overridden in specific environments using the files
33 | # in config/environments, which are processed later.
34 | #
35 | # config.time_zone = "Central Time (US & Canada)"
36 | # config.eager_load_paths << Rails.root.join("extras")
37 | end
38 | end
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Dockerizing Ruby Tutorial
2 |
3 | [](https://tomfern.semaphoreci.com/projects/dockerizing-ruby)
4 |
5 | ## Local setup
6 |
7 | Prepare environment, for dev version you can use the example environment:
8 |
9 | ```bash
10 | $ cp env-example .env
11 | ```
12 |
13 | Start the server:
14 |
15 | ```bash
16 | $ docker-compose up --build
17 | ```
18 |
19 | Browse http://localhost:8020
20 |
21 | ## License
22 |
23 | MIT License
24 |
25 | Copyright (c) 2022 Rendered Text
26 |
27 | Permission is hereby granted, free of charge, to any person obtaining a copy
28 | of this software and associated documentation files (the "Software"), to deal
29 | in the Software without restriction, including without limitation the rights
30 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31 | copies of the Software, and to permit persons to whom the Software is
32 | furnished to do so, subject to the following conditions:
33 |
34 | The above copyright notice and this permission notice shall be included in all
35 | copies or substantial portions of the Software.
36 |
37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43 | SOFTWARE.
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/drkiq/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
We're sorry, but something went wrong.
62 |
63 |
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/.semaphore/semaphore.yml:
--------------------------------------------------------------------------------
1 | version: v1.0
2 | name: Docker
3 | agent:
4 | machine:
5 | type: e1-standard-2
6 | os_image: ubuntu2004
7 | blocks:
8 | - name: Build!
9 | task:
10 | jobs:
11 | - name: Build drkiq
12 | commands:
13 | - 'docker pull $DOCKER_USERNAME/dockerizing-ruby-drkiq:latest || true'
14 | - 'docker build -t $DOCKER_USERNAME/dockerizing-ruby-drkiq:latest --cache-from=$DOCKER_USERNAME/dockerizing-ruby-drkiq:latest -f Dockerfile.production .'
15 | - 'docker push $DOCKER_USERNAME/dockerizing-ruby-drkiq:latest'
16 | - name: Build nginx
17 | commands:
18 | - 'docker pull $DOCKER_USERNAME/dockerizing-ruby-nginx:latest || true'
19 | - 'docker build -t $DOCKER_USERNAME/dockerizing-ruby-nginx:latest --cache-from=$DOCKER_USERNAME/dockerizing-ruby-nginx:latest -f Dockerfile.nginx .'
20 | - 'docker push $DOCKER_USERNAME/dockerizing-ruby-nginx:latest'
21 | secrets:
22 | - name: dockerhub
23 | prologue:
24 | commands:
25 | - checkout
26 | - 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin'
27 | - name: Tests
28 | task:
29 | secrets:
30 | - name: dockerhub
31 | prologue:
32 | commands:
33 | - 'checkout '
34 | - cp env-example .env
35 | - cat docker-compose.test.yml | envsubst | tee docker-compose.yml
36 | - 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin'
37 | - 'docker pull $DOCKER_USERNAME/dockerizing-ruby-drkiq:latest || true'
38 | - 'docker-compose run drkiq rake db:reset'
39 | - 'docker-compose run drkiq rake db:migrate'
40 | - 'docker-compose run drkiq rake db:test:prepare'
41 | jobs:
42 | - name: Rails Test
43 | commands:
44 | - docker-compose run drkiq rails test
45 |
--------------------------------------------------------------------------------
/drkiq/config/puma.rb:
--------------------------------------------------------------------------------
1 | # Puma can serve each request in a thread from an internal thread pool.
2 | # The `threads` method setting takes two numbers: a minimum and maximum.
3 | # Any libraries that use thread pools should be configured to match
4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum
5 | # and maximum; this matches the default thread size of Active Record.
6 | #
7 | max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8 | min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
9 | threads min_threads_count, max_threads_count
10 |
11 | # Specifies the `worker_timeout` threshold that Puma will use to wait before
12 | # terminating a worker in development environments.
13 | #
14 | worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
15 |
16 | # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
17 | #
18 | port ENV.fetch("PORT") { 3000 }
19 |
20 | # Specifies the `environment` that Puma will run in.
21 | #
22 | environment ENV.fetch("RAILS_ENV") { "development" }
23 |
24 | # Specifies the `pidfile` that Puma will use.
25 | pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
26 |
27 | # Specifies the number of `workers` to boot in clustered mode.
28 | # Workers are forked web server processes. If using threads and workers together
29 | # the concurrency of the application would be max `threads` * `workers`.
30 | # Workers do not work on JRuby or Windows (both of which do not support
31 | # processes).
32 | #
33 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
34 |
35 | # Use the `preload_app!` method when specifying a `workers` number.
36 | # This directive tells Puma to first boot the application and load code
37 | # before forking the application. This takes advantage of Copy On Write
38 | # process behavior so workers use less memory.
39 | #
40 | # preload_app!
41 |
42 | # Allow puma to be restarted by `bin/rails restart` command.
43 | plugin :tmp_restart
44 |
--------------------------------------------------------------------------------
/drkiq/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The change you wanted was rejected.
62 |
Maybe you tried to change something you didn't have access to.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/drkiq/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/env-example:
--------------------------------------------------------------------------------
1 | # Docker user and group ids
2 | # On linux these should match your ids
3 | #USER_ID=1000
4 | #GROUP_ID=1000
5 |
6 | # You would typically use rake secret to generate a secure token. It is
7 | # critical that you keep this value private in production.
8 | SECRET_TOKEN=Wa4Kdu6hMt3tYKm4jb9p4vZUuc7jBVFw
9 |
10 |
11 | # Unicorn is more than capable of spawning multiple workers, and in production
12 | # you would want to increase this value but in development you should keep it
13 | # set to 1.
14 | #
15 | # It becomes difficult to properly debug code if there's multiple copies of
16 | # your application running via workers and/or threads.
17 | WORKER_PROCESSES=1
18 |
19 |
20 | # This will be the address and port that Unicorn binds to. The only real
21 | # reason you would ever change this is if you have another service running
22 | # that must be on port 8000.
23 | LISTEN_ON=0.0.0.0:8010
24 |
25 |
26 | # This is how we'll connect to PostgreSQL. It's good practice to keep the
27 | # username lined up with your application's name but it's not necessary.
28 | #
29 | # Since we're dealing with development mode, it's ok to have a weak password
30 | # such as yourpassword but in production you'll definitely want a better one.
31 | #
32 | # Eventually we'll be running everything in Docker containers, and you can set
33 | # the host to be equal to postgres thanks to how Docker allows you to link
34 | # containers.
35 | #
36 | # Everything else is standard Rails configuration for a PostgreSQL database.
37 | DATABASE_URL=postgresql://drkiq:test_db_password@postgres:5432/drkiq?encoding=utf8&pool=5&timeout=5000
38 |
39 |
40 | # Both of these values are using the same Redis address but in a real
41 | # production environment you may want to separate Sidekiq to its own instance,
42 | # which is why they are separated here.
43 | #
44 | # We'll be using the same Docker link trick for Redis which is how we can
45 | # reference the Redis hostname as redis.
46 | CACHE_URL=redis://redis:6379/0
47 | JOB_WORKER_URL=redis://redis:6379/0
48 |
--------------------------------------------------------------------------------
/drkiq/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | # The test environment is used exclusively to run your application's
4 | # test suite. You never need to work with it otherwise. Remember that
5 | # your test database is "scratch space" for the test suite and is wiped
6 | # and recreated between test runs. Don't rely on the data there!
7 |
8 | Rails.application.configure do
9 | # Settings specified here will take precedence over those in config/application.rb.
10 |
11 | # Turn false under Spring and add config.action_view.cache_template_loading = true.
12 | config.cache_classes = true
13 |
14 | # Eager loading loads your whole application. When running a single test locally,
15 | # this probably isn't necessary. It's a good idea to do in a continuous integration
16 | # system, or in some way before deploying your code.
17 | config.eager_load = ENV["CI"].present?
18 |
19 | # Configure public file server for tests with Cache-Control for performance.
20 | config.public_file_server.enabled = true
21 | config.public_file_server.headers = {
22 | "Cache-Control" => "public, max-age=#{1.hour.to_i}"
23 | }
24 |
25 | # Show full error reports and disable caching.
26 | config.consider_all_requests_local = true
27 | config.action_controller.perform_caching = false
28 | config.cache_store = :null_store
29 |
30 | # Raise exceptions instead of rendering exception templates.
31 | config.action_dispatch.show_exceptions = false
32 |
33 | # Disable request forgery protection in test environment.
34 | config.action_controller.allow_forgery_protection = false
35 |
36 | # Store uploaded files on the local file system in a temporary directory.
37 | config.active_storage.service = :test
38 |
39 | config.action_mailer.perform_caching = false
40 |
41 | # Tell Action Mailer not to deliver emails to the real world.
42 | # The :test delivery method accumulates sent emails in the
43 | # ActionMailer::Base.deliveries array.
44 | config.action_mailer.delivery_method = :test
45 |
46 | # Print deprecation notices to the stderr.
47 | config.active_support.deprecation = :stderr
48 |
49 | # Raise exceptions for disallowed deprecations.
50 | config.active_support.disallowed_deprecation = :raise
51 |
52 | # Tell Active Support which deprecation messages to disallow.
53 | config.active_support.disallowed_deprecation_warnings = []
54 |
55 | # Raises error for missing translations.
56 | # config.i18n.raise_on_missing_translations = true
57 |
58 | # Annotate rendered view with file names.
59 | # config.action_view.annotate_rendered_view_with_filenames = true
60 | end
61 |
--------------------------------------------------------------------------------
/drkiq/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 | git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3 |
4 | ruby "3.1.2"
5 |
6 | gem 'unicorn', '~> 6.1.0'
7 | gem 'pg', '~> 1.3.5'
8 | gem 'sidekiq', '~> 6.4.2'
9 | gem 'redis-rails', '~> 5.0.2'
10 |
11 | # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
12 | gem "rails", "~> 7.0.2", ">= 7.0.2.4"
13 |
14 | # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
15 | gem "sprockets-rails"
16 |
17 | # Use sqlite3 as the database for Active Record
18 | gem "sqlite3", "~> 1.4"
19 |
20 | # Use the Puma web server [https://github.com/puma/puma]
21 | gem "puma", "~> 5.0"
22 |
23 | # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
24 | gem "importmap-rails"
25 |
26 | # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
27 | gem "turbo-rails"
28 |
29 | # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
30 | gem "stimulus-rails"
31 |
32 | # Build JSON APIs with ease [https://github.com/rails/jbuilder]
33 | gem "jbuilder"
34 |
35 | # Use Redis adapter to run Action Cable in production
36 | # gem "redis", "~> 4.0"
37 |
38 | # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
39 | # gem "kredis"
40 |
41 | # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
42 | # gem "bcrypt", "~> 3.1.7"
43 |
44 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
45 | gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
46 |
47 | # Reduces boot times through caching; required in config/boot.rb
48 | gem "bootsnap", require: false
49 |
50 | # Use Sass to process CSS
51 | # gem "sassc-rails"
52 |
53 | # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
54 | # gem "image_processing", "~> 1.2"
55 |
56 | group :development, :test do
57 | # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
58 | gem "debug", platforms: %i[ mri mingw x64_mingw ]
59 | end
60 |
61 | group :development do
62 | # Use console on exceptions pages [https://github.com/rails/web-console]
63 | gem "web-console"
64 |
65 | # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
66 | # gem "rack-mini-profiler"
67 |
68 | # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
69 | # gem "spring"
70 | end
71 |
72 | group :test do
73 | # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
74 | gem "capybara"
75 | gem "selenium-webdriver"
76 | gem "webdrivers"
77 | end
78 |
--------------------------------------------------------------------------------
/drkiq/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | Rails.application.configure do
4 | # Settings specified here will take precedence over those in config/application.rb.
5 |
6 | config.hosts << "drkiq"
7 |
8 | # In the development environment your application's code is reloaded any time
9 | # it changes. This slows down response time but is perfect for development
10 | # since you don't have to restart the web server when you make code changes.
11 | config.cache_classes = false
12 |
13 | # Do not eager load code on boot.
14 | config.eager_load = false
15 |
16 | # Show full error reports.
17 | config.consider_all_requests_local = true
18 |
19 | # Enable server timing
20 | config.server_timing = true
21 |
22 | # Enable/disable caching. By default caching is disabled.
23 | # Run rails dev:cache to toggle caching.
24 | if Rails.root.join("tmp/caching-dev.txt").exist?
25 | config.action_controller.perform_caching = true
26 | config.action_controller.enable_fragment_cache_logging = true
27 |
28 | config.cache_store = :memory_store
29 | config.public_file_server.headers = {
30 | "Cache-Control" => "public, max-age=#{2.days.to_i}"
31 | }
32 | else
33 | config.action_controller.perform_caching = false
34 |
35 | config.cache_store = :null_store
36 | end
37 |
38 | # Store uploaded files on the local file system (see config/storage.yml for options).
39 | config.active_storage.service = :local
40 |
41 | # Don't care if the mailer can't send.
42 | config.action_mailer.raise_delivery_errors = false
43 |
44 | config.action_mailer.perform_caching = false
45 |
46 | # Print deprecation notices to the Rails logger.
47 | config.active_support.deprecation = :log
48 |
49 | # Raise exceptions for disallowed deprecations.
50 | config.active_support.disallowed_deprecation = :raise
51 |
52 | # Tell Active Support which deprecation messages to disallow.
53 | config.active_support.disallowed_deprecation_warnings = []
54 |
55 | # Raise an error on page load if there are pending migrations.
56 | config.active_record.migration_error = :page_load
57 |
58 | # Highlight code that triggered database queries in logs.
59 | config.active_record.verbose_query_logs = true
60 |
61 | # Suppress logger output for asset requests.
62 | config.assets.quiet = true
63 |
64 | # Raises error for missing translations.
65 | # config.i18n.raise_on_missing_translations = true
66 |
67 | # Annotate rendered view with file names.
68 | # config.action_view.annotate_rendered_view_with_filenames = true
69 |
70 | # Uncomment if you wish to allow Action Cable access from any origin.
71 | # config.action_cable.disable_request_forgery_protection = true
72 | end
73 |
--------------------------------------------------------------------------------
/drkiq/config/unicorn.rb:
--------------------------------------------------------------------------------
1 | # Heavily inspired by GitLab:
2 | # https://github.com/gitlabhq/gitlabhq/blob/master/config/unicorn.rb.example
3 |
4 | # Go with at least 1 per CPU core, a higher amount will usually help for fast
5 | # responses such as reading from a cache.
6 | worker_processes ENV['WORKER_PROCESSES'].to_i
7 |
8 | # Listen on a tcp port or unix socket.
9 | listen ENV['LISTEN_ON']
10 |
11 | # Use a shorter timeout instead of the 60s default. If you are handling large
12 | # uploads you may want to increase this.
13 | timeout 30
14 |
15 | # Combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings:
16 | # http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
17 | preload_app true
18 | GC.respond_to?(:copy_on_write_friendly=) && GC.copy_on_write_friendly = true
19 |
20 | # Enable this flag to have unicorn test client connections by writing the
21 | # beginning of the HTTP headers before calling the application. This
22 | # prevents calling the application for connections that have disconnected
23 | # while queued. This is only guaranteed to detect clients on the same
24 | # host unicorn runs on, and unlikely to detect disconnects even on a
25 | # fast LAN.
26 | check_client_connection false
27 |
28 | before_fork do |server, worker|
29 | # Don't bother having the master process hang onto older connections.
30 | defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
31 |
32 | # The following is only recommended for memory/DB-constrained
33 | # installations. It is not needed if your system can house
34 | # twice as many worker_processes as you have configured.
35 | #
36 | # This allows a new master process to incrementally
37 | # phase out the old master process with SIGTTOU to avoid a
38 | # thundering herd (especially in the "preload_app false" case)
39 | # when doing a transparent upgrade. The last worker spawned
40 | # will then kill off the old master process with a SIGQUIT.
41 | old_pid = "#{server.config[:pid]}.oldbin"
42 | if old_pid != server.pid
43 | begin
44 | sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
45 | Process.kill(sig, File.read(old_pid).to_i)
46 | rescue Errno::ENOENT, Errno::ESRCH
47 | end
48 | end
49 |
50 | # Throttle the master from forking too quickly by sleeping. Due
51 | # to the implementation of standard Unix signal handlers, this
52 | # helps (but does not completely) prevent identical, repeated signals
53 | # from being lost when the receiving process is busy.
54 | # sleep 1
55 | end
56 |
57 | after_fork do |server, worker|
58 | # Per-process listener ports for debugging, admin, migrations, etc..
59 | # addr = "127.0.0.1:#{9293 + worker.nr}"
60 | # server.listen(addr, tries: -1, delay: 5, tcp_nopush: true)
61 |
62 | defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection
63 |
64 | # If preload_app is true, then you may also want to check and
65 | # restart any other shared sockets/descriptors such as Memcached,
66 | # and Redis. TokyoCabinet file handles are safe to reuse
67 | # between any number of forked children (assuming your kernel
68 | # correctly implements pread()/pwrite() system calls).
69 | end
--------------------------------------------------------------------------------
/drkiq/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | Rails.application.configure do
4 | # Settings specified here will take precedence over those in config/application.rb.
5 |
6 | # Code is not reloaded between requests.
7 | config.cache_classes = true
8 |
9 | # Eager load code on boot. This eager loads most of Rails and
10 | # your application in memory, allowing both threaded web servers
11 | # and those relying on copy on write to perform better.
12 | # Rake tasks automatically ignore this option for performance.
13 | config.eager_load = true
14 |
15 | # Full error reports are disabled and caching is turned on.
16 | config.consider_all_requests_local = false
17 | config.action_controller.perform_caching = true
18 |
19 | # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20 | # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21 | # config.require_master_key = true
22 |
23 | # Disable serving static files from the `/public` folder by default since
24 | # Apache or NGINX already handles this.
25 | config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
26 |
27 | # Compress CSS using a preprocessor.
28 | # config.assets.css_compressor = :sass
29 |
30 | # Do not fallback to assets pipeline if a precompiled asset is missed.
31 | config.assets.compile = false
32 |
33 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
34 | # config.asset_host = "http://assets.example.com"
35 |
36 | # Specifies the header that your server uses for sending files.
37 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
38 | # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
39 |
40 | # Store uploaded files on the local file system (see config/storage.yml for options).
41 | config.active_storage.service = :local
42 |
43 | # Mount Action Cable outside main process or domain.
44 | # config.action_cable.mount_path = nil
45 | # config.action_cable.url = "wss://example.com/cable"
46 | # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
47 |
48 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
49 | # config.force_ssl = true
50 |
51 | # Include generic and useful information about system operation, but avoid logging too much
52 | # information to avoid inadvertent exposure of personally identifiable information (PII).
53 | config.log_level = :info
54 |
55 | # Prepend all log lines with the following tags.
56 | config.log_tags = [ :request_id ]
57 |
58 | # Use a different cache store in production.
59 | # config.cache_store = :mem_cache_store
60 |
61 | # Use a real queuing backend for Active Job (and separate queues per environment).
62 | # config.active_job.queue_adapter = :resque
63 | # config.active_job.queue_name_prefix = "drkiq_production"
64 |
65 | config.action_mailer.perform_caching = false
66 |
67 | # Ignore bad email addresses and do not raise email delivery errors.
68 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
69 | # config.action_mailer.raise_delivery_errors = false
70 |
71 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
72 | # the I18n.default_locale when a translation cannot be found).
73 | config.i18n.fallbacks = true
74 |
75 | # Don't log any deprecations.
76 | config.active_support.report_deprecations = false
77 |
78 | # Use default logging formatter so that PID and timestamp are not suppressed.
79 | config.log_formatter = ::Logger::Formatter.new
80 |
81 | # Use a different logger for distributed setups.
82 | # require "syslog/logger"
83 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
84 |
85 | if ENV["RAILS_LOG_TO_STDOUT"].present?
86 | logger = ActiveSupport::Logger.new(STDOUT)
87 | logger.formatter = config.log_formatter
88 | config.logger = ActiveSupport::TaggedLogging.new(logger)
89 | end
90 |
91 | # Do not dump schema after migrations.
92 | config.active_record.dump_schema_after_migration = false
93 | end
94 |
--------------------------------------------------------------------------------
/drkiq/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | actioncable (7.0.2.4)
5 | actionpack (= 7.0.2.4)
6 | activesupport (= 7.0.2.4)
7 | nio4r (~> 2.0)
8 | websocket-driver (>= 0.6.1)
9 | actionmailbox (7.0.2.4)
10 | actionpack (= 7.0.2.4)
11 | activejob (= 7.0.2.4)
12 | activerecord (= 7.0.2.4)
13 | activestorage (= 7.0.2.4)
14 | activesupport (= 7.0.2.4)
15 | mail (>= 2.7.1)
16 | net-imap
17 | net-pop
18 | net-smtp
19 | actionmailer (7.0.2.4)
20 | actionpack (= 7.0.2.4)
21 | actionview (= 7.0.2.4)
22 | activejob (= 7.0.2.4)
23 | activesupport (= 7.0.2.4)
24 | mail (~> 2.5, >= 2.5.4)
25 | net-imap
26 | net-pop
27 | net-smtp
28 | rails-dom-testing (~> 2.0)
29 | actionpack (7.0.2.4)
30 | actionview (= 7.0.2.4)
31 | activesupport (= 7.0.2.4)
32 | rack (~> 2.0, >= 2.2.0)
33 | rack-test (>= 0.6.3)
34 | rails-dom-testing (~> 2.0)
35 | rails-html-sanitizer (~> 1.0, >= 1.2.0)
36 | actiontext (7.0.2.4)
37 | actionpack (= 7.0.2.4)
38 | activerecord (= 7.0.2.4)
39 | activestorage (= 7.0.2.4)
40 | activesupport (= 7.0.2.4)
41 | globalid (>= 0.6.0)
42 | nokogiri (>= 1.8.5)
43 | actionview (7.0.2.4)
44 | activesupport (= 7.0.2.4)
45 | builder (~> 3.1)
46 | erubi (~> 1.4)
47 | rails-dom-testing (~> 2.0)
48 | rails-html-sanitizer (~> 1.1, >= 1.2.0)
49 | activejob (7.0.2.4)
50 | activesupport (= 7.0.2.4)
51 | globalid (>= 0.3.6)
52 | activemodel (7.0.2.4)
53 | activesupport (= 7.0.2.4)
54 | activerecord (7.0.2.4)
55 | activemodel (= 7.0.2.4)
56 | activesupport (= 7.0.2.4)
57 | activestorage (7.0.2.4)
58 | actionpack (= 7.0.2.4)
59 | activejob (= 7.0.2.4)
60 | activerecord (= 7.0.2.4)
61 | activesupport (= 7.0.2.4)
62 | marcel (~> 1.0)
63 | mini_mime (>= 1.1.0)
64 | activesupport (7.0.2.4)
65 | concurrent-ruby (~> 1.0, >= 1.0.2)
66 | i18n (>= 1.6, < 2)
67 | minitest (>= 5.1)
68 | tzinfo (~> 2.0)
69 | addressable (2.8.0)
70 | public_suffix (>= 2.0.2, < 5.0)
71 | bindex (0.8.1)
72 | bootsnap (1.11.1)
73 | msgpack (~> 1.2)
74 | builder (3.2.4)
75 | capybara (3.36.0)
76 | addressable
77 | matrix
78 | mini_mime (>= 0.1.3)
79 | nokogiri (~> 1.8)
80 | rack (>= 1.6.0)
81 | rack-test (>= 0.6.3)
82 | regexp_parser (>= 1.5, < 3.0)
83 | xpath (~> 3.2)
84 | childprocess (4.1.0)
85 | concurrent-ruby (1.1.10)
86 | connection_pool (2.2.5)
87 | crass (1.0.6)
88 | debug (1.5.0)
89 | irb (>= 1.3.6)
90 | reline (>= 0.2.7)
91 | digest (3.1.0)
92 | erubi (1.10.0)
93 | globalid (1.0.0)
94 | activesupport (>= 5.0)
95 | i18n (1.10.0)
96 | concurrent-ruby (~> 1.0)
97 | importmap-rails (1.0.3)
98 | actionpack (>= 6.0.0)
99 | railties (>= 6.0.0)
100 | io-console (0.5.11)
101 | irb (1.4.1)
102 | reline (>= 0.3.0)
103 | jbuilder (2.11.5)
104 | actionview (>= 5.0.0)
105 | activesupport (>= 5.0.0)
106 | kgio (2.11.4)
107 | loofah (2.17.0)
108 | crass (~> 1.0.2)
109 | nokogiri (>= 1.5.9)
110 | mail (2.7.1)
111 | mini_mime (>= 0.1.1)
112 | marcel (1.0.2)
113 | matrix (0.4.2)
114 | method_source (1.0.0)
115 | mini_mime (1.1.2)
116 | minitest (5.15.0)
117 | msgpack (1.5.1)
118 | net-imap (0.2.3)
119 | digest
120 | net-protocol
121 | strscan
122 | net-pop (0.1.1)
123 | digest
124 | net-protocol
125 | timeout
126 | net-protocol (0.1.3)
127 | timeout
128 | net-smtp (0.3.1)
129 | digest
130 | net-protocol
131 | timeout
132 | nio4r (2.5.8)
133 | nokogiri (1.13.4-aarch64-linux)
134 | racc (~> 1.4)
135 | pg (1.3.5)
136 | public_suffix (4.0.7)
137 | puma (5.6.4)
138 | nio4r (~> 2.0)
139 | racc (1.6.0)
140 | rack (2.2.3)
141 | rack-test (1.1.0)
142 | rack (>= 1.0, < 3)
143 | rails (7.0.2.4)
144 | actioncable (= 7.0.2.4)
145 | actionmailbox (= 7.0.2.4)
146 | actionmailer (= 7.0.2.4)
147 | actionpack (= 7.0.2.4)
148 | actiontext (= 7.0.2.4)
149 | actionview (= 7.0.2.4)
150 | activejob (= 7.0.2.4)
151 | activemodel (= 7.0.2.4)
152 | activerecord (= 7.0.2.4)
153 | activestorage (= 7.0.2.4)
154 | activesupport (= 7.0.2.4)
155 | bundler (>= 1.15.0)
156 | railties (= 7.0.2.4)
157 | rails-dom-testing (2.0.3)
158 | activesupport (>= 4.2.0)
159 | nokogiri (>= 1.6)
160 | rails-html-sanitizer (1.4.2)
161 | loofah (~> 2.3)
162 | railties (7.0.2.4)
163 | actionpack (= 7.0.2.4)
164 | activesupport (= 7.0.2.4)
165 | method_source
166 | rake (>= 12.2)
167 | thor (~> 1.0)
168 | zeitwerk (~> 2.5)
169 | raindrops (0.20.0)
170 | rake (13.0.6)
171 | redis (4.6.0)
172 | redis-actionpack (5.3.0)
173 | actionpack (>= 5, < 8)
174 | redis-rack (>= 2.1.0, < 3)
175 | redis-store (>= 1.1.0, < 2)
176 | redis-activesupport (5.3.0)
177 | activesupport (>= 3, < 8)
178 | redis-store (>= 1.3, < 2)
179 | redis-rack (2.1.4)
180 | rack (>= 2.0.8, < 3)
181 | redis-store (>= 1.2, < 2)
182 | redis-rails (5.0.2)
183 | redis-actionpack (>= 5.0, < 6)
184 | redis-activesupport (>= 5.0, < 6)
185 | redis-store (>= 1.2, < 2)
186 | redis-store (1.9.1)
187 | redis (>= 4, < 5)
188 | regexp_parser (2.3.1)
189 | reline (0.3.1)
190 | io-console (~> 0.5)
191 | rexml (3.2.5)
192 | rubyzip (2.3.2)
193 | selenium-webdriver (4.1.0)
194 | childprocess (>= 0.5, < 5.0)
195 | rexml (~> 3.2, >= 3.2.5)
196 | rubyzip (>= 1.2.2)
197 | sidekiq (6.4.2)
198 | connection_pool (>= 2.2.2)
199 | rack (~> 2.0)
200 | redis (>= 4.2.0)
201 | sprockets (4.0.3)
202 | concurrent-ruby (~> 1.0)
203 | rack (> 1, < 3)
204 | sprockets-rails (3.4.2)
205 | actionpack (>= 5.2)
206 | activesupport (>= 5.2)
207 | sprockets (>= 3.0.0)
208 | sqlite3 (1.4.2)
209 | stimulus-rails (1.0.4)
210 | railties (>= 6.0.0)
211 | strscan (3.0.1)
212 | thor (1.2.1)
213 | timeout (0.2.0)
214 | turbo-rails (1.0.1)
215 | actionpack (>= 6.0.0)
216 | railties (>= 6.0.0)
217 | tzinfo (2.0.4)
218 | concurrent-ruby (~> 1.0)
219 | unicorn (6.1.0)
220 | kgio (~> 2.6)
221 | raindrops (~> 0.7)
222 | web-console (4.2.0)
223 | actionview (>= 6.0.0)
224 | activemodel (>= 6.0.0)
225 | bindex (>= 0.4.0)
226 | railties (>= 6.0.0)
227 | webdrivers (5.0.0)
228 | nokogiri (~> 1.6)
229 | rubyzip (>= 1.3.0)
230 | selenium-webdriver (~> 4.0)
231 | websocket-driver (0.7.5)
232 | websocket-extensions (>= 0.1.0)
233 | websocket-extensions (0.1.5)
234 | xpath (3.2.0)
235 | nokogiri (~> 1.8)
236 | zeitwerk (2.5.4)
237 |
238 | PLATFORMS
239 | aarch64-linux
240 |
241 | DEPENDENCIES
242 | bootsnap
243 | capybara
244 | debug
245 | importmap-rails
246 | jbuilder
247 | pg (~> 1.3.5)
248 | puma (~> 5.0)
249 | rails (~> 7.0.2, >= 7.0.2.4)
250 | redis-rails (~> 5.0.2)
251 | selenium-webdriver
252 | sidekiq (~> 6.4.2)
253 | sprockets-rails
254 | sqlite3 (~> 1.4)
255 | stimulus-rails
256 | turbo-rails
257 | tzinfo-data
258 | unicorn (~> 6.1.0)
259 | web-console
260 | webdrivers
261 |
262 | RUBY VERSION
263 | ruby 3.1.2p20
264 |
265 | BUNDLED WITH
266 | 2.3.12
267 |
--------------------------------------------------------------------------------