0
My appは、コンテナにデプロイする必要のないfullstack java MVCフレームワーク上に構築されています。しかし、私はアプリを構築して立ち上げるためにスクリプトを実行する必要があります。herokuにスクリプトを実行してアプリを起動する方法
スクリプトの内容は非常に簡単です:
#!/bin/sh
if [ ! -f target/dist/start ]; then
mvn clean package
cd target/dist
unzip *.zip
else
cd target/dist
fi
./run $*
スクリプトは、プロジェクトのホームフォルダに座っています。
私はProcfile
で次のコマンドを追加しましたが、それは動作しません:
web: ./run_prod
私はHerokuのにデプロイすると、それは成功したと言うが、私は私のアプリにアクセスするときは常に言う:
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
Herokuのログファイルが示しています
2017-02-26T00:50:00.000000+00:00 app[api]: Build succeeded
2017-02-26T00:50:25.559742+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=todobackend-act.herokuapp.com request_id=59af9898-b6c7-4a51-ae0e-33ffae0d1f6d fwd="61.69.245.214" dyno= connect= service= status=503 bytes=
2017-02-26T00:50:26.533034+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=todobackend-act.herokuapp.com request_id=bf30ce34-edb0-46dc-870c-b92a24bc0cf5 fwd="61.69.245.214" dyno= connect= service= status=503 bytes=
2017-02-26T00:52:25.290301+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=todobackend-act.herokuapp.com request_id=0996409a-5024-4473-9616-1bc760c117e4 fwd="61.69.245.214" dyno= connect= service= status=503 bytes=
2017-02-26T00:52:26.102216+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=todobackend-act.herokuapp.com request_id=fd155207-cafc-420e-a0f1-0d3e6b73d4de fwd="61.69.245.214" dyno= connect= service= status=503 bytes=
任意のアイデア?
実際、私はそれがまったく始まったのだろうかと思います。アプリを起動するには'cd target/dist && unzip * .zip &&。/ start'が必要です –