JDBC in tomcat container for different environments

We have a tomcat webapp using a external jdbc database. Configuration of database username, password and host can be read from environment vars or file.
Is it possible to configure different database connections for that container in different rancher environments ( quality,test,production … ) withour rebuilding the container or stack ? Once a (tested!) container image is builded and test it never should be rebuilded again pushing it to production.

what´s the best solution for that without changing a container, using container volumns or rancher host environment. (a host shoud support more than one environment… )
Defining environment vars global for each rancher environment is not possible, right ?