version with database. external postgres
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,7 +7,7 @@
|
|||||||
# Ignore bundler config.
|
# Ignore bundler config.
|
||||||
/.bundle
|
/.bundle
|
||||||
vendor/gems
|
vendor/gems
|
||||||
app/views/welcome/*.erb.html
|
app/views/welcome/*.html.erb
|
||||||
|
|
||||||
# Ignore all environment files.
|
# Ignore all environment files.
|
||||||
/.env*
|
/.env*
|
||||||
|
|||||||
13
Gemfile
13
Gemfile
@ -1,24 +1,21 @@
|
|||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "rails", "~> 8.1.1"
|
gem "rails", "~> 8.0.0"
|
||||||
gem "propshaft"
|
gem "propshaft"
|
||||||
# gem "sqlite3", ">= 2.1"
|
gem "pg"
|
||||||
gem "puma"
|
gem "puma"
|
||||||
gem "importmap-rails"
|
gem "importmap-rails"
|
||||||
gem "turbo-rails"
|
gem "turbo-rails"
|
||||||
gem "stimulus-rails"
|
gem "stimulus-rails"
|
||||||
gem "jbuilder"
|
gem "jbuilder"
|
||||||
gem 'tailwindcss-rails'
|
gem "tailwindcss-rails"
|
||||||
gem 'foreman'
|
gem "foreman"
|
||||||
|
gem "dotenv"
|
||||||
|
|
||||||
# gem "bcrypt", "~> 3.1.7"
|
# gem "bcrypt", "~> 3.1.7"
|
||||||
|
|
||||||
gem "tzinfo-data", platforms: %i[ windows jruby ]
|
gem "tzinfo-data", platforms: %i[ windows jruby ]
|
||||||
|
|
||||||
#gem "solid_cache"
|
|
||||||
#gem "solid_queue"
|
|
||||||
#gem "solid_cable"
|
|
||||||
|
|
||||||
gem "bootsnap", require: false
|
gem "bootsnap", require: false
|
||||||
gem "kamal", require: false
|
gem "kamal", require: false
|
||||||
gem "thruster", require: false
|
gem "thruster", require: false
|
||||||
|
|||||||
@ -1,14 +1,9 @@
|
|||||||
require_relative "boot"
|
require_relative "boot"
|
||||||
|
require "dotenv"
|
||||||
|
|
||||||
# require "rails/all"
|
require "rails/all"
|
||||||
# require "active_model/railtie"
|
|
||||||
# And now the rest
|
|
||||||
require "action_controller/railtie"
|
|
||||||
require "action_mailer/railtie"
|
|
||||||
require "action_view/railtie"
|
|
||||||
require "active_job/railtie"
|
|
||||||
require "action_cable/engine"
|
|
||||||
|
|
||||||
|
Dotenv.load
|
||||||
|
|
||||||
# Require the gems listed in Gemfile, including any gems
|
# Require the gems listed in Gemfile, including any gems
|
||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
|
|||||||
15
config/database.yml
Normal file
15
config/database.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
default: &default
|
||||||
|
adapter: postgresql
|
||||||
|
encoding: unicode
|
||||||
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||||
|
timeout: 5000
|
||||||
|
|
||||||
|
development:
|
||||||
|
primary:
|
||||||
|
<<: *default
|
||||||
|
database: <%= ENV.fetch("DATABASE_URL") %>
|
||||||
|
|
||||||
|
production:
|
||||||
|
primary:
|
||||||
|
<<: *default
|
||||||
|
database: <%= ENV.fetch("DATABASE_URL") %>
|
||||||
@ -1,45 +0,0 @@
|
|||||||
# SQLite. Versions 3.8.0 and up are supported.
|
|
||||||
# gem install sqlite3
|
|
||||||
#
|
|
||||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
||||||
# gem "sqlite3"
|
|
||||||
#
|
|
||||||
default: &default
|
|
||||||
adapter: sqlite3
|
|
||||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
|
||||||
timeout: 5000
|
|
||||||
|
|
||||||
development:
|
|
||||||
primary:
|
|
||||||
<<: *default
|
|
||||||
database: storage/development.sqlite3
|
|
||||||
queue:
|
|
||||||
<<: *default
|
|
||||||
database: storage/development_queue.sqlite3
|
|
||||||
migrations_paths: db/queue_migrate
|
|
||||||
|
|
||||||
# Warning: The database defined as "test" will be erased and
|
|
||||||
# re-generated from your development database when you run "rake".
|
|
||||||
# Do not set this db to the same as development or production.
|
|
||||||
test:
|
|
||||||
<<: *default
|
|
||||||
database: storage/test.sqlite3
|
|
||||||
|
|
||||||
# Store production database in the storage/ directory, which by default
|
|
||||||
# is mounted as a persistent Docker volume in config/deploy.yml.
|
|
||||||
production:
|
|
||||||
primary:
|
|
||||||
<<: *default
|
|
||||||
database: storage/production.sqlite3
|
|
||||||
cache:
|
|
||||||
<<: *default
|
|
||||||
database: storage/production_cache.sqlite3
|
|
||||||
migrations_paths: db/cache_migrate
|
|
||||||
queue:
|
|
||||||
<<: *default
|
|
||||||
database: storage/production_queue.sqlite3
|
|
||||||
migrations_paths: db/queue_migrate
|
|
||||||
cable:
|
|
||||||
<<: *default
|
|
||||||
database: storage/production_cable.sqlite3
|
|
||||||
migrations_paths: db/cable_migrate
|
|
||||||
1
env.example
Normal file
1
env.example
Normal file
@ -0,0 +1 @@
|
|||||||
|
DATABASE_URL=postgesql://user:password@rails6.wicom.li/database
|
||||||
Reference in New Issue
Block a user