Hi David,
     I am not sure I quite understood your use case, but here's an idea:

     You may point you datasources to a local host address defined in 
/etc/hosts (for example: "geoserverdatabase"), preferably one that is 
not resolvable by your internal dns.
     To change between demo/staging/live db servers, you just have to 
change the address that your "geoserverdatabase" server points to in 
/etc/hosts, without changes to your application code or geoserver 
configuration.
     I have just tested this here and it works.

Best,
Daniel

Em 18/08/2016 18:37, David Haynes II escreveu:
> Hello Everyone,
>
> This isn't necessarily a Geoserver question, but I am hoping to get 
> some advice from this group on what tools and tips will make this 
> work. I have a web application that consumes wms produced by 
> Geoserver. Currently we have a large number of layers  and view that 
> connect directly to the PostGIS database. Generally speaking our 
> applications using Ruby on Rails for connecting to the database.
>
> As the database changes the applications reflect these changes. We 
> have three ruby environments (demo, staging, live) each with multiple 
> database, which may or may not be serving the active application. I 
> want to abstract out the connection logic when defining a layers/view 
> so that and when they are when created they look to the environment 
> not the actual database. Is anyone doing something like this and can 
> offer some ideas.
>
>
> -- 
> David Haynes, Ph.D.
> Research Associate Terra Populus
> Minnesota Population Center
> 612-626-3933
> www.terrapop.org <http://www.terrapop.org>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users


------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to