postgres support

This commit is contained in:
Zachary Chai 2017-01-19 15:09:34 -05:00
parent dcc20f875c
commit 3a3b054786
4 changed files with 13 additions and 4 deletions

View File

@ -6,6 +6,8 @@ ruby '2.3.1'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1' gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use sqlite3 as the database for Active Record # Use sqlite3 as the database for Active Record
gem 'sqlite3' gem 'sqlite3'
# Use postgres as the database for Active Record
gem 'pg'
# Use Puma as the app server # Use Puma as the app server
gem 'puma', '~> 3.0' gem 'puma', '~> 3.0'
# Use SCSS for stylesheets # Use SCSS for stylesheets

View File

@ -131,6 +131,7 @@ GEM
omniauth-twitter (1.2.1) omniauth-twitter (1.2.1)
json (~> 1.3) json (~> 1.3)
omniauth-oauth (~> 1.1) omniauth-oauth (~> 1.1)
pg (0.19.0)
puma (3.6.0) puma (3.6.0)
rack (2.0.1) rack (2.0.1)
rack-test (0.6.3) rack-test (0.6.3)
@ -225,6 +226,7 @@ DEPENDENCIES
omniauth (= 1.3.1) omniauth (= 1.3.1)
omniauth-google-oauth2 (= 0.4.1) omniauth-google-oauth2 (= 0.4.1)
omniauth-twitter (= 1.2.1) omniauth-twitter (= 1.2.1)
pg
puma (~> 3.0) puma (~> 3.0)
rails (~> 5.0.0, >= 5.0.0.1) rails (~> 5.0.0, >= 5.0.0.1)
rails-timeago (~> 2.0) rails-timeago (~> 2.0)

View File

@ -21,5 +21,10 @@ test:
database: db/test.sqlite3 database: db/test.sqlite3
production: production:
<<: *default adapter: <%= ENV['DB_ADAPTER'] || 'sqlite3' %>
database: db/production/production.sqlite3 host: <%= ENV['DB_HOST'] %>
database: <%= ENV['DB_NAME'] || 'db/production/production.sqlite3' %>
username: <%= ENV['DB_USERNAME'] %>
password: <%= ENV['DB_PASSWORD'] %>
pool: <%= ENV['DB_POOL'] || 5 %>
timeout: <%= ENV['DB_TIMEOUT'] || 5000 %>

4
env
View File

@ -47,7 +47,7 @@ SMTP_PASSWORD=yourpassword
# Twitter Login Provider (optional) # Twitter Login Provider (optional)
# #
# You will need to register the app at https://apps.twitter.com/ # You will need to register the app at https://apps.twitter.com/
# For the callback URL use 'http://<your hostname:port>/users/auth/twitter/callback' # For the callback URL use 'http://<your hostname:port>/auth/twitter/callback'
# Once registered copy the ID and Secret here # Once registered copy the ID and Secret here
# #
TWITTER_ID= TWITTER_ID=
@ -57,7 +57,7 @@ TWITTER_SECRET=
# #
# You will need to register for at https://console.developers.google.com/apis/credentials # You will need to register for at https://console.developers.google.com/apis/credentials
# Select Oauth client ID -> web application # Select Oauth client ID -> web application
# For the callback URL use 'http://<your hostname:port>/users/auth/google/callback' # For the callback URL use 'http://<your hostname:port>/auth/google/callback'
# Once registered copy the ID and Secret here # Once registered copy the ID and Secret here
# #
GOOGLE_OAUTH2_ID= GOOGLE_OAUTH2_ID=