Wiki source code of How to create a database connection available on several environment (Development and Production)
Last modified by Aurelie Bertrand on 2021/08/25 09:51
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = Create server variables = | ||
2 | |||
3 | There will be a variable containing the IP of database server, another containing login and another one with the password. | ||
4 | Those variables are created in the file: | ||
5 | path_to_your_digdahs_install/Enterprise Server/ddentrepriseapi\config\serversetting.xml | ||
6 | Edit the file by replacing the line: | ||
7 | {{code language="xml"}}<group category="$uisrv.Advanced" id="serverParams" name="$uisrv.ServerParams">{{/code}} | ||
8 | By: | ||
9 | {{code language="xml"}}<group category="$uisrv.Advanced" id="serverParams" name="$uisrv.ServerParams"> | ||
10 | <input disabled="false" mandatory="false" name="ip_address_bdd" reg="false" sample="" showif="" src="" text="ip_address_bdd" type="textfield" userparam="false" value="myIP"/> | ||
11 | <input disabled="false" mandatory="false" name="login" reg="false" sample="" showif="" src="" text=" login " type="textfield" userparam="false" value="myLogin"/> | ||
12 | <input disabled="false" mandatory="false" name="password" reg="false" sample="" showif="" src="" text="password" type="textfield" userparam="false" value="myPassword"/> | ||
13 | </group>{{/code}} | ||
14 | |||
15 | Change attributes text and name (in the input tags) by the name of the variable that you want to use, and value by its value | ||
16 | |||
17 | = Create database connection = | ||
18 | |||
19 | While creating the database connection, fill fields like this: | ||
20 | [[image:1596100693452-857.png]] | ||
21 | |||
22 | Password is hidden but you have to paste: ${server.password} | ||
23 | Edit the identifier of the connection and set the same connection id on every environment (development and production) |