pg instead

This commit is contained in:
24c02 2026-01-27 18:36:53 -05:00
parent 0c3b1fbe2f
commit 5946de3614
3 changed files with 34 additions and 29 deletions

View file

@ -4,8 +4,8 @@ source "https://rubygems.org"
gem "rails", "~> 8.0.4"
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
gem "propshaft"
# Use sqlite3 as the database for Active Record
gem "sqlite3", ">= 2.1"
# Use postgres as the database for Active Record
gem "pg", "~> 1.3"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma", ">= 5.0"

View file

@ -212,6 +212,13 @@ GEM
parser (3.3.10.1)
ast (~> 2.4.1)
racc
pg (1.6.3)
pg (1.6.3-aarch64-linux)
pg (1.6.3-aarch64-linux-musl)
pg (1.6.3-arm64-darwin)
pg (1.6.3-x86_64-darwin)
pg (1.6.3-x86_64-linux)
pg (1.6.3-x86_64-linux-musl)
phlex (2.4.0)
refract (~> 1.0)
zeitwerk (~> 2.7)
@ -356,14 +363,6 @@ GEM
fugit (~> 1.11)
railties (>= 7.1)
thor (>= 1.3.1)
sqlite3 (2.9.0-aarch64-linux-gnu)
sqlite3 (2.9.0-aarch64-linux-musl)
sqlite3 (2.9.0-arm-linux-gnu)
sqlite3 (2.9.0-arm-linux-musl)
sqlite3 (2.9.0-arm64-darwin)
sqlite3 (2.9.0-x86_64-darwin)
sqlite3 (2.9.0-x86_64-linux-gnu)
sqlite3 (2.9.0-x86_64-linux-musl)
stringio (3.2.0)
thor (1.5.0)
thruster (0.1.17)
@ -428,6 +427,7 @@ DEPENDENCIES
jb
omniauth
omniauth-hack_club
pg (~> 1.3)
phlex-rails
propshaft
pry-rails
@ -439,7 +439,6 @@ DEPENDENCIES
solid_cable
solid_cache
solid_queue
sqlite3 (>= 2.1)
thruster
tzinfo-data
vite_rails

View file

@ -1,45 +1,51 @@
# SQLite. Versions 3.8.0 and up are supported.
# gem install sqlite3
# PostgreSQL. Versions 9.3 and up are supported.
# gem install pg
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem "sqlite3"
# Ensure the pg gem is defined in your Gemfile
# gem "pg"
#
default: &default
adapter: sqlite3
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
<<: *default
database: storage/development.sqlite3
database: cdn_development
# 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
database: cdn_test
# SQLite3 write its data on the local filesystem, as such it requires
# persistent disks. If you are deploying to a managed service, you should
# make sure it provides disk persistence, as many don't.
#
# Similarly, if you deploy your application as a Docker container, you must
# ensure the database is located in a persisted volume.
production:
primary:
<<: *default
# database: path/to/persistent/storage/production.sqlite3
database: <%= ENV["DATABASE_NAME"] || "cdn_production" %>
host: <%= ENV["DATABASE_HOST"] %>
user: <%= ENV["DATABASE_USER"] %>
password: <%= ENV["DATABASE_PASSWORD"] %>
cache:
<<: *default
# database: path/to/persistent/storage/production_cache.sqlite3
database: <%= ENV["CACHE_DATABASE_NAME"] || "cdn_cache" %>
host: <%= ENV["CACHE_DATABASE_HOST"] %>
user: <%= ENV["CACHE_DATABASE_USER"] %>
password: <%= ENV["CACHE_DATABASE_PASSWORD"] %>
migrations_paths: db/cache_migrate
queue:
<<: *default
# database: path/to/persistent/storage/production_queue.sqlite3
database: <%= ENV["QUEUE_DATABASE_NAME"] || "cdn_queue" %>
host: <%= ENV["QUEUE_DATABASE_HOST"] %>
user: <%= ENV["QUEUE_DATABASE_USER"] %>
password: <%= ENV["QUEUE_DATABASE_PASSWORD"] %>
migrations_paths: db/queue_migrate
cable:
<<: *default
# database: path/to/persistent/storage/production_cable.sqlite3
database: <%= ENV["CABLE_DATABASE_NAME"] || "cdn_cable" %>
host: <%= ENV["CABLE_DATABASE_HOST"] %>
user: <%= ENV["CABLE_DATABASE_USER"] %>
password: <%= ENV["CABLE_DATABASE_PASSWORD"] %>
migrations_paths: db/cable_migrate