Hi Ivy Team

Assuming I have a global prop such as :

myGlobalProp: http://myIP:1234/whatever

myIP is different for Dev, Test and Prod. Is there a way to "inject" myIP at startup of the Docker image ?

Or generally:

If I want to build an image which should be deployed in Dev, Test and Prod, is there a way to parameterize all the config files used for the Ivy Engine (yaml, xml, etc.) ?

Thanks & Regards John

asked 20.05 at 11:20

John%20Moser's gravatar image

John Moser
1137
accept rate: 0%


Hello John Moser

Yes, there are several ways to provide environment specific configurations. Docker and Axon.ivy offer many capabilities of parameterization for different environments. The difficulty is to decide which methods or mix of methods fits best for your projects needs.

One could either:

  1. mount different configuration files (like ivy.yaml, app.yaml, etc.) per environment into the container. I think that makes sense if every stage (dev, int, prod) looks completely different and the resulting yaml files have almost nothing in common.

  2. use environment variables to override parts of our configurations https://developer.axonivy.com/doc/latest/EngineGuideHtml/configuration.html#configuration-override. This is recommended if you only want to override a few configuration values while most configurations in the yaml files are shared.

  3. build an image per environment. could sound a bit strange. but like in the first scenario you can provide different configuration files (like ivy.yaml, app.yaml, etc.). but you don't need to mount a volume at runtime. this will lead to immutable configurations that are only modifyable from within the container.

the docker per env approach could look like this:

## acmeDockerfile
FROM axonivy/axonivy-engine
COPY --chown=ivy:ivy AxonIvyEngine.lic /etc/axonivy-engine-7x/
...

## acmeProdDockerfile
FROM acmeDockerfile
COPY --chown=ivy:ivy ivy-prod.yaml /etc/axonivy-engine-7x/ivy.yaml

## acmeTestDockerfile
FROM acmeDockerfile
COPY --chown=ivy:ivy ivy-test.yaml /etc/axonivy-engine-7x/ivy.yaml

you may also check how to handle passwords (secrets) in containers: https://developer.axonivy.com/doc/latest/EngineGuideHtml/configuration.html#engine-configuration-docker

link

answered 21.05 at 03:05

Alex%20Suter's gravatar image

Alex Suter ♦♦
2.1k91936
accept rate: 84%

edited 23.05 at 08:54

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
7.9k11549

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×107
×31
×31
×6

Asked: 20.05 at 11:20

Seen: 70 times

Last updated: 23.05 at 08:54