From 691eda27fb8ca5474a2f713d2725f0debcfbb6dc Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 25 Apr 2024 22:15:38 -0700 Subject: [PATCH] move to port 3001 if we are going to port bind, set up dory, update gemfile to alpha standard --- .env | 2 +- Gemfile | 103 +++++++---------------------- config/application.rb | 1 + config/environments/development.rb | 2 +- docker-compose.yml | 7 +- 5 files changed, 32 insertions(+), 83 deletions(-) diff --git a/.env b/.env index 98e9e6b..689ded7 100644 --- a/.env +++ b/.env @@ -5,4 +5,4 @@ DB_PASSWORD=DatabaseFTW DB_NAME=employee360 DB_USER=postgres DB_TEST_NAME=employee360_test -HOST_URL=http://localhost:3000 \ No newline at end of file +HOST_URL=http://localhost:3001 diff --git a/Gemfile b/Gemfile index e5e0465..79ca239 100644 --- a/Gemfile +++ b/Gemfile @@ -1,78 +1,25 @@ -source "https://rubygems.org" -git_source(:github) { |repo| "https://github.com/#{repo}.git" } - -ruby "3.1.3" - -# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.0.6" - -# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] -gem "sprockets-rails" - -# Use postgresql as the database for Active Record -gem "pg", "~> 1.1" - -# Use the Puma web server [https://github.com/puma/puma] -gem "puma", "~> 5.0" - -# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] -gem "importmap-rails" - -# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] -gem "turbo-rails" - -# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] -gem "stimulus-rails" - -# Build JSON APIs with ease [https://github.com/rails/jbuilder] -gem "jbuilder" - -# Use Redis adapter to run Action Cable in production -# gem "redis", "~> 4.0" - -# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] -# gem "kredis" - -# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] -# gem "bcrypt", "~> 3.1.7" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] - -# Reduces boot times through caching; required in config/boot.rb -gem "bootsnap", require: false - -# Use Sass to process CSS -# gem "sassc-rails" - -# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] -# gem "image_processing", "~> 1.2" - -group :development, :test do - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri mingw x64_mingw ] -end - -group :development do - # Use console on exceptions pages [https://github.com/rails/web-console] - gem "web-console" - - # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] - # gem "rack-mini-profiler" - - # Speed up commands on slow machines / big apps [https://github.com/rails/spring] - # gem "spring" -end - -group :test do - # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] - gem "capybara" - gem "selenium-webdriver" - gem "webdrivers" -end - -gem "devise", "~> 4.9" - -gem "bootstrap", "~> 5.2" - -gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main' \ No newline at end of file +source 'https://rubygems.org' +git_source(:github) { |repo| 'https://github.com/#{repo}.git' } + +ruby '3.1.3' + +gem 'rails', '~> 7.0.6' + +gem 'bootsnap', require: false +gem 'bootstrap', '~> 5.2' +gem 'capybara', group: [:test] +gem 'debug', platforms: %i[ mri mingw x64_mingw ], group: [:development, :test] +gem 'devise', '~> 4.9' +gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main' +gem 'importmap-rails' +gem 'jbuilder' +gem 'pg', '~> 1.1' +gem 'puma', '~> 5.0' +gem 'rack-mini-profiler', group: [:development] +gem 'selenium-webdriver', group: [:test] +gem 'sprockets-rails' +gem 'stimulus-rails' +gem 'turbo-rails' +gem 'tzinfo-data', platforms: %i[ mingw mswin x64_mingw jruby ] +gem 'web-console', group: [:development] +gem 'webdrivers', group: [:test] diff --git a/config/application.rb b/config/application.rb index e2ee31e..27f2c63 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,6 +11,7 @@ class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 config.hosts << ENV.fetch('HOST_URL') + config.hosts << 'employee360.test' # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files diff --git a/config/environments/development.rb b/config/environments/development.rb index 8500f45..638a13a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -64,7 +64,7 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - + config.web_console.whitelisted_ips = ['172.18.0.0/16', '172.27.0.0/16', '0.0.0.0/0'] # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true end diff --git a/docker-compose.yml b/docker-compose.yml index 18e46a1..35e7402 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,12 +15,13 @@ services: web: <<: *app ports: - - "3000:3000" + - "3001:3000" depends_on: - db environment: - DATABASE_URL=${DB_ADAPTER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} - + - VIRTUAL_PORT=3000 + - VIRTUAL_HOST=employee360.test db: image: postgres:13.3 environment: @@ -44,4 +45,4 @@ services: volumes: pg_data: - shared: \ No newline at end of file + shared: