Spring Boot + Elastic Beanstalk .ebextensions in JAR

前端 未结 5 1999
遇见更好的自我
遇见更好的自我 2021-02-13 15:44

I have a very standard Spring Boot application (with a application.properties properties file located in standard /src/main/resources folder) which I\'

5条回答
  •  天命终不由人
    2021-02-13 15:59

    I believe in this case that standalone JAR is used, it's easier to go with Procfile-based configuration and then bundle your JAR and .ebextensions into a zip file.

    First create a file, called Procfile in the root of the project with following content:

    web: java -jar sample_app-1.0.0.jar
    

    Then create a zip file, containing the JAR and Procfile file and .ebextensions directory:

    sample_app.zip
    |
    |_.ebextensions
    |   |_ nginx
    |      |_ conf.d
    |         |_ proxy.conf
    |
    |_ sample_app-1.0.0.jar
    |_ Procfile
    

提交回复
热议问题