diff --git a/Procfile b/Procfile index a2e9c0e..767916b 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,3 @@ -rails: rails server -p 3333 -webpack: ./bin/webpack-dev-server +release: bin/rails db:migrate +worker: NODE_ENV=production bin/rails webpacker:compile +web: bin/rails server -p $PORT -e $RAILS_ENV diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 0000000..a2e9c0e --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,2 @@ +rails: rails server -p 3333 +webpack: ./bin/webpack-dev-server diff --git a/app.json b/app.json index f806380..a0ec22f 100644 --- a/app.json +++ b/app.json @@ -2,8 +2,7 @@ "name": "elmsanity", "description": "", "scripts": { - "postdeploy": "cp config/database.yml.postgresql config/database.yml; bundle exec rails db:create; bundle exec rails db:migrate; NODE_ENV=production bundle exec rails webpacker:compile" - }, +}, "env": { "SECRET_KEY_BASE": { "generator": "secret" @@ -14,11 +13,14 @@ "HEROKU": "true" }, "formation": { + "web": { "quantity": 1 }, + "worker": { "quantity": 1 } }, "addons": [ ], "buildpacks": [ - + { "url": "heroku/nodejs" }, + { "url": "heroku/ruby" } ] } diff --git a/config/database.yml b/config/database.yml deleted file mode 100644 index 29cc972..0000000 --- a/config/database.yml +++ /dev/null @@ -1,22 +0,0 @@ -development: - adapter: postgresql - 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 - timeout: 5000 - -test: - adapter: postgresql - database: elmsanity_test - pool: 5 diff --git a/package.json b/package.json index bb06d8c..6b140f7 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,10 @@ "@rails/webpacker": "^3.0.2", "coffeescript": "1.12.7", "elm": "^0.18.0", - "elm-webpack-loader": "^4.4.0" + "elm-webpack-loader": "^4.4.0", + "webpack-dev-server": "^2.9.4" }, "devDependencies": { - "elm-hot-loader": "^0.5.4", - "webpack-dev-server": "^2.9.4" + "elm-hot-loader": "^0.5.4" } }