Search code examples
javagradleherokumultiserver

How to setup dynos and procfile for multi-web servers with springboot-gradle


I want to make app application on Heroku. However, I don't know what to do with the build settings. I followed the guide called 'Multiple web server apps in the same project' of the following documents. (https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku#deploying-multi-project-builds)

When I opened the app(daview-admin-api), I couldn't see a phrase similar to'hello world', and I checked the following log.
Dec 03 07:07:15 daview-admin-api heroku/router at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=daview-admin-api.herokuapp.com request_id=543758ec-ae7f-4fd1-8881-0666c8fdbfe7 fwd="175.208.161.47" dyno= connect= service= status=503 bytes= protocol=https

The configuration is as follows:
daview(Spring boot Framework with Gradle)
├── daview-common(models; domains and utils)
│ ├── src
│ └── build.gradle
├── daview-admin-api(server; controllers and services)
│ ├── src
│ └── build.gradle
├── daview-customer-api(server; controllers and services)
│ ├── src
│ └── build.gradle
├── daview-login-api(server; controllers and services)
│ ├── src
│ └── build.gradle
└── Procfile
└── settings.gradle

Please explain it in detail at Beginner level.

Regards,
Changjoo, Sohn


Solution

  • This was solved by setting PORT in each application.yml of subprojects.
    server:
         port: ${PORT:5000}