-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove sqlite3 gem as it isn't supported on Heroku * Add staging environment to database.yml * Fix: Not a git repository (or any parent up to mount point /app) * Copy example database.yml.postgresql before running db:setup * The "db:setup" setup task isn't supported It causes following errors as the "db:reset" subtask cannot be run on Heroku. FATAL: permission denied for database "postgres" DETAIL: User does not have CONNECT privilege. * Fix: Missing for 'staging' environment * Don't force SSL in staging environment * Add staging environment config in "config/webpacker.yml" * Try 'webpacker:compile' task in postdeploy hook * Changes in config/webpacker.yml * Add 'nodejs' buildback (Ref: rails/webpacker#739) * Cleanup
- Loading branch information
Vishal Telangre
authored
Nov 30, 2017
1 parent
555785d
commit 063ee4c
Showing
11 changed files
with
51 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
rails: rails server -p 3333 | ||
webpack: ./bin/webpack-dev-server | ||
release: bin/rails db:migrate | ||
web: bin/rails server -p $PORT -e $RAILS_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rails: rails server -p 3333 | ||
webpack: ./bin/webpack-dev-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
{ | ||
"name": "elmsanity", | ||
"description": "", | ||
"scripts": { | ||
"postdeploy": "bundle exec rails db:setup" | ||
}, | ||
"scripts": {}, | ||
"env": { | ||
"SECRET_KEY_BASE": { | ||
"generator": "secret" | ||
}, | ||
"RACK_ENV": "staging", | ||
"RAILS_ENV": "staging", | ||
"LOG_LEVEL": "DEBUG", | ||
"HEROKU": "true" | ||
} | ||
}, | ||
"formation": { | ||
"web": { | ||
"quantity": 1 | ||
} | ||
}, | ||
"addons": [ | ||
|
||
{ | ||
"plan": "heroku-postgresql", | ||
"options": { | ||
"version": "9.5" | ||
} | ||
} | ||
], | ||
"buildpacks": [ | ||
|
||
{ | ||
"url": "heroku/nodejs" | ||
}, | ||
{ | ||
"url": "heroku/ruby" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
<% branch_name = `git symbolic-ref HEAD 2>/dev/null`.chomp.sub('refs/heads/', '') %> | ||
<% repository_name = `git rev-parse --show-toplevel`.split('/').last.strip %> | ||
|
||
development: | ||
adapter: postgresql | ||
encoding: unicode | ||
database: <%= repository_name %>_development | ||
database: elmsanity_development | ||
host: localhost | ||
pool: 5 | ||
|
||
staging: | ||
adapter: postgresql | ||
database: elmsanity_staging | ||
pool: 5 | ||
timeout: 5000 | ||
|
||
production: | ||
adapter: postgresql | ||
database: elmsanity_production | ||
pool: 5 | ||
username: postgres | ||
password: | ||
timeout: 5000 | ||
|
||
test: | ||
adapter: postgresql | ||
encoding: unicode | ||
database: <%= repository_name %>_test | ||
database: elmsanity_test | ||
pool: 5 | ||
username: postgres | ||
password: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace :assets do | ||
desc "Compile assets" | ||
task precompile: [:environment] do | ||
Rake::Task["webpacker:compile"].invoke | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters