close

Filter

loading table of contents...

Deployment Manual / Version 2110

Table Of Contents

2.3.2 Start Time Configuration

Start time configuration can be achieved using

  • environment variables

  • mounted configuration files

Configuring Spring-Boot applications using environment variables is probably the most common case and is the default choice in a container based environment. With Docker you simply add each environment variable on the command-line or pass in a path to a file with the environment variables. With Spring environment variables are defined in upper case and transformed by Spring to the java properties syntax.

  • REPOSITORY_URL is transformed to repository.url

  • LINK_URLPREFIXTYPE is transformed to link.urlPrefixType

To pass in environment variables use the -e or the --env-file options, that is

passing environment variables on the command-line. 

docker run \
 -e REPOSITORY_URL=http://my-host:40180/ior coremedia/cae-preview

Configuring the application by mounting a configuration file should only be used if passing variables in does not work or if replacing an existing configuration file is desired. To mount a file into the container, the path to the file or directory on the host and in the container must be defined. I.e.

mounting configuration files. 

docker run \
 -v $PWD/override.properties:/coremedia/config/application.properties \
 coremedia/cae-live

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.