forked from External/greenlight
support postgres in production
This commit is contained in:
parent
911bfb446e
commit
26a9f588a1
6
Gemfile
6
Gemfile
|
@ -11,6 +11,9 @@ gem 'rails', '~> 5.0.7'
|
||||||
# Use Puma as the app server
|
# Use Puma as the app server
|
||||||
gem 'puma', '~> 3.0'
|
gem 'puma', '~> 3.0'
|
||||||
|
|
||||||
|
# Use SQLite as the primary database.
|
||||||
|
gem 'sqlite3'
|
||||||
|
|
||||||
# Use SCSS for stylesheets
|
# Use SCSS for stylesheets
|
||||||
gem 'sass-rails', '~> 5.0'
|
gem 'sass-rails', '~> 5.0'
|
||||||
|
|
||||||
|
@ -62,9 +65,6 @@ group :production do
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# Use SQLite in development and test.
|
|
||||||
gem 'sqlite3'
|
|
||||||
|
|
||||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
gem 'byebug', platform: :mri
|
gem 'byebug', platform: :mri
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,11 @@ test:
|
||||||
adapter: sqlite3
|
adapter: sqlite3
|
||||||
database: db/development.sqlite3
|
database: db/development.sqlite3
|
||||||
|
|
||||||
|
# Use sqlite in production by default. Greenlight supports
|
||||||
production:
|
production:
|
||||||
<<: *default
|
<<: *default
|
||||||
adapter: postgresql
|
adapter: <%= ENV['DB_ADAPTER'] || 'sqlite3' %>
|
||||||
database: greenlight_production
|
host: <%= ENV['DB_HOST'] %>
|
||||||
encoding: unicode
|
database: <%= ENV['DB_NAME'] || 'db/production/production.sqlite3' %>
|
||||||
username: postgres
|
username: <%= ENV['DB_USERNAME'] %>
|
||||||
password:
|
password: <%= ENV['DB_PASSWORD'] %>
|
||||||
host: db
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue