[mapserver-users] Setting a connection host from ENV

Ben Madin ben at ausvet.com.au
Wed Jul 29 07:44:07 PDT 2020


G'day all,

I am migrating a number of systems onto containers, and have hit a blocker
with a solution with over 100 mapfiles, all of which refer to a database
that is tucked away in a vpc in the cloud, with an a record for the
connection host (ie host.cloud.com)

I also have a copy of the database on a development machine (ie
host.docker.internal)

For most everything else in the docker world (our web interfaces etc), I
can set use env variables in the container system, but I'm really
struggling with how best to do this in this case. I can do a url variable
for the connection parameter, and specify the database in every call...
seems pretty clumsy, and not good practice really. but my attempts to
reference environment variables in the mapfile have been very unsuccessful.

Could I ask :

a) is there actually a simpler way to achieve the same outcome, that I have
completely missed, or

b) does someone have an example of how to do it?

c) is this actually just not possible, and I should just get my sed out
before every deployment commit?

cheers

Ben


-- 

[image: Ausvet Logo] <https://www.ausvet.com.au/>

Dr Ben Madin

BVMS MVPHMgmt PhD MANZCVS GAICD
Managing Director
Mobile:
+61 448 887 220 <+61448887220>
E-mail:
ben at ausvet.com.au
Website:
www.ausvet.com.au
Skype: benmadin
Address:
5 Shuffrey Street
Fremantle, WA 6160
Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200729/b2795dd0/attachment.htm>


More information about the MapServer-users mailing list