実現したいこと
Rails,react,Docker環境でアプリを構築しまし、一通り完成したつもりなので
Herokuへデプロイをしたいのですが、うまくいかずに悩んでいます。
backendとfrontendでフォルダーを分けて開発を行なっています。
発生している問題・エラーメッセージ
フロントエンド側エラー npm ERR! code ELIFECYCLE 2022-06-20T15:35:27.792057+00:00 app[web.1]: npm ERR! errno 1 2022-06-20T15:35:27.794533+00:00 app[web.1]: npm ERR! frontend@0.1.0 start: `react-scripts start` 2022-06-20T15:35:27.794781+00:00 app[web.1]: npm ERR! Exit status 1 2022-06-20T15:35:27.794963+00:00 app[web.1]: npm ERR! 2022-06-20T15:35:27.795035+00:00 app[web.1]: npm ERR! Failed at the frontend@0.1.0 start script. 2022-06-20T15:35:27.795178+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2022-06-20T15:35:27.802743+00:00 app[web.1]: 2022-06-20T15:35:27.802850+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-06-20T15:35:27.802936+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-06-20T15_35_27_795Z-debug.log 2022-06-20T15:35:27.958946+00:00 heroku[web.1]: Process exited with status 1 2022-06-20T15:35:28.019051+00:00 heroku[web.1]: State changed from up to crashed 2022-06-20T15:40:51.283211+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=englist-f.herokuapp.com request_id=73b67342-7ebe-4feb-b449-fab167862c12 fwd="106.180.10.162" dyno= connect= service= status=503 bytes= protocol=https
バックエンド側エラー Unable to load application: ArgumentError: Missing `secret_key_base` for 'production' environment, set this string with `rails credentials:edit` 2022-06-20T17:57:57.714748+00:00 app[web.1]: bundler: failed to load command: puma (/usr/local/bundle/bin/puma) 2022-06-20T17:57:57.714778+00:00 app[web.1]: ArgumentError: Missing `secret_key_base` for 'production' environment, set this string with `rails credentials:edit` 2022-06-20T17:57:57.714779+00:00 app[web.1]: /usr/local/bundle/gems/railties-6.0.4.7/lib/rails/application.rb:588:in `validate_secret_key_base' 2022-06-20T17:57:57.714780+00:00 app[web.1]: /usr/local/bundle/gems/railties-6.0.4.7/lib/rails/application.rb:423:in `secret_key_base' 2022-06-20T17:57:57.714781+00:00 app[web.1]: /usr/local/bundle/gems/devise-4.8.1/lib/devise/secret_key_finder.rb:24:in `key_exists?' 2022-06-20T17:57:57.714781+00:00 app[web.1]: /usr/local/bundle/gems/devise-4.8.1/lib/devise/secret_key_finder.rb:16:in `find' 2022-06-20T17:57:57.714781+00:00 app[web.1]: /usr/local/bundle/gems/devise-4.8.1/lib/devise/rails.rb:37:in `block in <class:Engine>' 2022-06-20T17:57:57.714781+00:00 app[web.1]: /usr/local/bundle/gems/railties-6.0.4.7/lib/rails/initializable.rb:32:in `instance_exec' 2022-06-20T17:57:57.714782+00:00 app[web.1]: /usr/local/bundle/gems/railties-6.0.4.7/lib/rails/initializable.rb:32:in `run' 2022-06-20T17:57:57.714782+00:00 app[web.1]: /usr/local/bundle/gems/railties-6.0.4.7/lib/rails/initializable.rb:61:in `block in run_initializers' 2022-06-20T17:57:57.714782+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each' 2022-06-20T17:57:57.714783+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' 2022-06-20T17:57:57.714783+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from' 2022-06-20T17:57:57.714783+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component' 2022-06-20T17:57:57.714784+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:347:in `each' 2022-06-20T17:57:57.714784+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:347:in `call' 2022-06-20T17:57:57.714784+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component' 2022-06-20T17:57:57.714785+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each' 2022-06-20T17:57:57.714785+00:00 app[web.1]: /usr/local/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each' 2022-06-20T17:57:57.714785+00:00 app[web.1]: /usr/local/bundle/gems/railties-6.0.4.7/lib/rails/initializable.rb:60:in `run_initializers' 2022-06-20T17:57:57.714785+00:00 app[web.1]: /usr/local/bundle/gems/railties-6.0.4.7/lib/rails/application.rb:363:in `initialize!' 2022-06-20T17:57:57.714786+00:00 app[web.1]: /myapp/config/environment.rb:5:in `<top (required)>' 2022-06-20T17:57:57.714786+00:00 app[web.1]: config.ru:3:in `require_relative' 2022-06-20T17:57:57.714787+00:00 app[web.1]: config.ru:3:in `block in <main>' 2022-06-20T17:57:57.714787+00:00 app[web.1]: /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval' 2022-06-20T17:57:57.714787+00:00 app[web.1]: /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string' 2022-06-20T17:57:57.714787+00:00 app[web.1]: /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file' 2022-06-20T17:57:57.714788+00:00 app[web.1]: /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file' 2022-06-20T17:57:57.714788+00:00 app[web.1]: /usr/local/bundle/gems/puma-4.3.12/lib/puma/configuration.rb:321:in `load_rackup' 2022-06-20T17:57:57.714788+00:00 app[web.1]: /usr/local/bundle/gems/puma-4.3.12/lib/puma/configuration.rb:246:in `app' 2022-06-20T17:57:57.714788+00:00 app[web.1]: /usr/local/bundle/gems/puma-4.3.12/lib/puma/runner.rb:155:in `load_and_bind' 2022-06-20T17:57:57.714789+00:00 app[web.1]: /usr/local/bundle/gems/puma-4.3.12/lib/puma/single.rb:98:in `run' 2022-06-20T17:57:57.714789+00:00 app[web.1]: /usr/local/bundle/gems/puma-4.3.12/lib/puma/launcher.rb:172:in `run' 2022-06-20T17:57:57.714789+00:00 app[web.1]: /usr/local/bundle/gems/puma-4.3.12/lib/puma/cli.rb:80:in `run' 2022-06-20T17:57:57.714789+00:00 app[web.1]: /usr/local/bundle/gems/puma-4.3.12/bin/puma:10:in `<top (required)>' 2022-06-20T17:57:57.714790+00:00 app[web.1]: /usr/local/bundle/bin/puma:23:in `load' 2022-06-20T17:57:57.714790+00:00 app[web.1]: /usr/local/bundle/bin/puma:23:in `<top (required)>' 2022-06-20T17:57:57.883268+00:00 heroku[web.1]: Process exited with status 1 2022-06-20T17:57:57.924554+00:00 heroku[web.1]: State changed from starting to crashed 2022-06-20T17:57:58.765086+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=englist.herokuapp.com request_id=2207c202-391a-46e3-90db-5b813206653b fwd="106.180.10.162" dyno= connect= service= status=503 bytes= protocol=https
あなたの回答
tips
プレビュー