spring-bootherokudyno

Heroku add on ever deploy -Dspring.profiles.active=prod


I have 3 application.yml one for dev and one for prod application.yml (default set to dev) application-dev . yml application-prod . yml

When running this command - Dspring.profiles.active=prod it will use my production, how am I able to get this working in heroku?

enter image description here Already tried adding -- spring.profiles.active and - Dspring.profiles.active but both are not recognized is there something that i'm missing?


Solution

  • Define a config vars

    heroku config:set SPRING_PROFILES_ACTIVE=prod
    

    You can also add it in the Heroku Dashboard (key-value)