fix: production uses postgres

This commit is contained in:
Aaro Koivukangas
2023-11-16 17:48:40 +02:00
parent ab226f1f21
commit cc00e6aab0
4 changed files with 7 additions and 7 deletions
+1 -4
View File
@@ -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
+2
View File
@@ -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
View File
@@ -21,5 +21,4 @@ test:
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
url: <%= ENV.fetch("DATABASE_URL") %>
+3 -1
View File
@@ -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