Configuration file¶
To configure the build and run of the project, you can create an amverum.yml
or amverum.yaml
file in the root of the repository. An alternative is to use Dockerfile.
It is best to create amverum.yaml
in the application interface in the «Configuration» section, so it will be automatically added to the
root of the project, creating a new commit in the git repository.
You can also use our yaml generator by following the link, or independently, using the instructions below.
If the configuration file is missing, Amverum will look for the Dockerfile file.
If Dockerfile
is found, it will be used for the build. If Dockerfile
is also not found, the build will fail.
In the future, for clarity, we will refer to the file amverum.yml
or amverum.yaml
as amverum.yaml
.
Configuration file structure¶
The amverum.yaml
file consists of three sections.
meta¶
The meta
section defines general information about the build, such as the environment and build tools.
A list of supported environments and their detailed descriptions can be found on this page.
An example of the meta
section for a JVM application built with Maven:
meta:
environment: jvm
toolchain:
name: maven
version: 17
You can read more about building JVM applications using Maven in the Amverum service here.
build¶
The build
section defines the parameters required to build the application. These parameters are different for different environments.
You can read about the parameters for your environment in the corresponding section of this documentation.
If you do not need to specify build parameters, you can omit the build
section.
In our example of building a JVM application using Maven, all build parameters are optional. However, if you need to specify additional compilation parameters, you can do this as follows:
build:
args: -Dserver.port=80 -Pproduction
run¶
The run
section defines the parameters required to run the application. Similar to the build for different environments,
these parameters are different and are described in the corresponding section of this documentation.
So, the persistenceMount
parameter specifies the folder to which the persistent storage will be mounted.
In other words, if /data
is specified there, then this is the path to save important files while the application is running.
If you do not need to specify the launch parameters, then the run
section can be omitted.
In our example of building a JVM application using Maven, in the run section you must at least specify the path to the jar file relative to the project root:
run:
jarName: bag-end.jar
Example¶
So, the entire amverum.yaml
file for our example looks like this:
meta:
environment: jvm
toolchain:
name: maven
version: 17
build:
args: -Dserver.port=80 -Pproduction
run:
jarName: bag-end.jar
Since the configuration file format is YAML, sections can be specified in any order.