D
D
Danil2021-01-28 16:30:08
tomcat
Danil, 2021-01-28 16:30:08

Tomcat 8.5 how to assign different values ​​to the same environment variables for the same project?

Hello
, I have a file on my tomket bin/setenv.shand there I wrote down the variables for entering the database. Looks like this:

export DATASOURCE_URL="<URL>"
export DATASOURCE_USER="<USER>"
export DATASOURCE_PASSWORD="<PASSWORD>"

I also have my application in webapps/myapp_prodwhich my variables are used.
Now let's say I want to deploy the same application again, but already here webapps/myapp_devand I want my variables to have a different value there, that is, I want to specify other data for the connection to the database (use another database)

How can I do this do? Is there any design else ifin setenv.shor is it possible to create different setenv.shones for different webapps? How to solve this without changing the application itself?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question