When porting Springboot applications to Openshift using S2I (source to image) directly from a git repo you cannot rely on a start script passing the proper -Dspring.profiles.active=<profile name> parameter like this
java -Dspring.profiles.active=development -jar yourApplication.jar
The only proper ways for injecting application configuration are
- Add it to the artifact/repository (meeh)
- Mount it using a config map
- Pass it via Docker environment variables
And for Openshift variant #3 works fine as there is an environment variable
SPRING_PROFILES_ACTIVE which you can add in your deployment configuration and set it to your favourite spring profile name.