mirror of
https://github.com/iritmaximus/brewery.git
synced 2026-10-12 19:13:49 +03:00
fix: production uses postgres
This commit is contained in:
@@ -89,10 +89,7 @@ group :development, :test do
|
||||
end
|
||||
|
||||
group :production do
|
||||
# TODO replace sqlite3 with postgres in production
|
||||
# also remember config/database.yml
|
||||
gem "sqlite3"
|
||||
#gem "pg"
|
||||
gem "pg"
|
||||
end
|
||||
|
||||
gem "dockerfile-rails", ">= 1.5", :group => :development
|
||||
|
||||
@@ -157,6 +157,7 @@ GEM
|
||||
parser (3.2.2.4)
|
||||
ast (~> 2.4.1)
|
||||
racc
|
||||
pg (1.5.4)
|
||||
pry (0.14.2)
|
||||
coderay (~> 1.1)
|
||||
method_source (~> 1.0)
|
||||
@@ -310,6 +311,7 @@ DEPENDENCIES
|
||||
importmap-rails
|
||||
jbuilder
|
||||
launchy
|
||||
pg
|
||||
pry-byebug
|
||||
puma (~> 5.0)
|
||||
rails (~> 7.0.4)
|
||||
|
||||
+1
-2
@@ -21,5 +21,4 @@ test:
|
||||
database: db/test.sqlite3
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
database: db/production.sqlite3
|
||||
url: <%= ENV.fetch("DATABASE_URL") %>
|
||||
|
||||
@@ -23,6 +23,8 @@ class BeermappingApi
|
||||
end
|
||||
|
||||
def self.key
|
||||
Rails.application.credentials.beermap_api_key
|
||||
return nil if Rails.env.test?
|
||||
raise 'BEERMAPPING_APIKEY env variable not defined' if ENV['BEERMAPPING_APIKEY'].nil?
|
||||
ENV.fetch('BEERMAPPING_APIKEY')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user