Define application properties on build using Spring Boot and Maven

I have a spring boot application that uses a database. I have the local configuration in the application.properties file. I understand it is possible to change the values when I build the project with maven. I want to set the production values (db on AWS).

Here is application.properties

  • Rancher: Can we deploy with zero down time
  • Jenkins run docker image with wrong image name
  • How to clone and customise laravel homestead and install more things in it?
  • How to configure docker registry always up and running when configured with redis?
  • Unable to start Mysql in a Dockerfile when executing CMD script
  • Issue with docker Inter container communication on the isolated bridge
  • spring.datasource.url=${db.url:jdbc:postgresql://localhost:5432/mydb}
    spring.datasource.username=${db.username:localusername}
    spring.datasource.password=${db.password:localpassword}
    

    I would like to change the values when I run. This will create a docker image.

    mvn package docker:build
    

    Is it possible?

  • Error when trying to run a meteor app in docker using meteorhacks:meteord
  • Can we deploy an asp.net mvc 4 app to docker with windows container?
  • Docker can't connect to the internet from with proxy
  • How to connect postgresql container to django container?
  • What is the difference between docker and docker-compose
  • using a maven docker plugin to commit and save an image on maven release
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.