Skip to content

Commit

Permalink
update with project-syncing action
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 25, 2024
1 parent 0800cea commit caadfed
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ gem "dotenv"
gem "faker"
gem "htmlbeautifier"
gem "http"
gem "rails_db"
gem "sqlite3", "~> 1.4"
gem "table_print"
gem "simple_form"
Expand All @@ -94,7 +95,6 @@ group :development do
gem "draft_generators"
gem "grade_runner"
gem "pry-rails"
gem "rails_db"
gem "rails-erd"
gem "rufo"
gem "specs_to_readme"
Expand Down
2 changes: 1 addition & 1 deletion bin/render-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -o errexit

# Ruby on Rails
bundle exec puma -C config/puma.rb
bundle exec rails server
39 changes: 18 additions & 21 deletions config/initializers/rails_db.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
if Object.const_defined?('RailsDb')
RailsDb.setup do |config|
# # enabled or not
# config.enabled = Rails.env.development?
# only enable the gem if environment variables are set for username and password
if ENV.fetch("RAILS_DB_USERNAME", nil).present? && ENV.fetch("RAILS_DB_PASSWORD", nil).present?
# enable
config.enabled = true

# # automatic engine routes mounting
# config.automatic_routes_mount = true
# automatic engine routes mounting
config.automatic_routes_mount = true

# set tables which you want to hide ONLY
config.black_list_tables = ["ar_internal_metadata"]
# set tables which you want to hide ONLY
config.black_list_tables = ["ar_internal_metadata"]

# set tables which you want to show ONLY
# config.white_list_tables = ['posts', 'comments']
# Enable http basic authentication
config.http_basic_authentication_enabled = true

# # Enable http basic authentication
# config.http_basic_authentication_enabled = false
# Enable http basic authentication
config.http_basic_authentication_user_name = ENV.fetch("RAILS_DB_USERNAME")

# # Enable http basic authentication
# config.http_basic_authentication_user_name = 'rails_db'

# # Enable http basic authentication
# config.http_basic_authentication_password = 'password'

# # Enable http basic authentication
# config.verify_access_proc = proc { |controller| true }

# # Sandbox mode (only read-only operations)
# config.sandbox = false
# Enable http basic authentication
config.http_basic_authentication_password = ENV.fetch("RAILS_DB_PASSWORD")
else
config.enabled = false
config.automatic_routes_mount = false
end
end
end
4 changes: 3 additions & 1 deletion render.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
- type: web
name: my-app-name # the name of this service, you should change this
env: ruby # this app is written in ruby
runtime: ruby # this app is written in ruby
plan: free # make sure to set this to free or you'll get billed $$$
buildCommand: "./bin/render-build.sh" # we already created these two files for you
startCommand: "./bin/render-start.sh"
Expand All @@ -12,6 +12,8 @@ services:
fromDatabase:
name: db
property: connectionString
- key: WEB_CONCURRENCY
value: 2
databases: # this section provides some additional database configuration
- name: db
plan: free
Expand Down

0 comments on commit caadfed

Please sign in to comment.