You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by ron <ro...@gmail.com> on 2015/06/17 17:30:14 UTC

Re: how set system properties for datasource into resources.xml from variables environments

This is a very old post I know but is this only for openshift? or is that a
general thing? Reason I ask is I want to run tomee in a docker container and
have it connect to a postgresql database running in another docker instance.

Ron



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/how-set-system-properties-for-datasource-into-resources-xml-from-variables-environments-tp4664217p4675335.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: how set system properties for datasource into resources.xml from variables environments

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Ron

if you set the config through environment (let say XXX_URL and XXX_USER and
XXX_PWD) then you can just use placeholders in your resource:

JdbcUrl = ${XXX_URL}
UserName = ${XXX_USER}
Password = ${XXX_PWD}



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-06-17 17:30 GMT+02:00 ron <ro...@gmail.com>:

> This is a very old post I know but is this only for openshift? or is that a
> general thing? Reason I ask is I want to run tomee in a docker container
> and
> have it connect to a postgresql database running in another docker
> instance.
>
> Ron
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/how-set-system-properties-for-datasource-into-resources-xml-from-variables-environments-tp4664217p4675335.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>