Deployment Manual / Version 2404
Table Of ContentsStart 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 torepository.url
LINK_URLPREFIXTYPE
is transformed tolink.urlPrefixType
To pass in environment variables use the -e
or the --env-file
options.
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