C# mono¶
This configuration is suitable if the project is built and launched using Mono. In this case, the project can be written in languages such as C#.
You can write a yaml file yourself using the instructions below, or use our yaml generator by clicking on link, or fill it out in the «Configuration» section of your personal account.
Section meta¶
The meta
section of the amverum.yml
file will look like this:
meta:
environment: csharp
toolchain:
name: mono
version: latest
The parameter that can be changed here is meta.toolchain.version
. Logically, this is the version of the Mono image that should be used for the build. Technically, the value of version
is substituted into the name of the Docker image that will be used.
For the build and run phase, this is mono:${meta.toolchain.version}
. The valid values can be seen on the docker hub page.
Important
The value of meta.toolchain.version must be valid for both the build and run phases. A simple Mono LTS version number is best.
Section build¶
The following parameters can be specified in the build
section:
image
mainFile
The image
parameter allows you to use a different build image than the one provided by Amverum. The image must meet the following requirements:
source code for the build is expected in the /app folder (or image, no matter where the source code is located);
The mainFile
parameter is MANDATORY. It is necessary to pass the name of the file with the Main method with the extension. Example:
build:
mainFile: Program.cs
Section run¶
The following parameters can be used in the run
section:
image
persistenceMount
containerPort
The image
parameter allows you to use a different build image than the one provided by Amverum. The image must meet the following requirements:
the build result is expected in the /app folder (or image, it doesn’t matter where the build result is located);
The persistenceMount
parameter allows you to specify in which directory the folder with persistent storage will be mounted.
The default value is /data
.
The containerPort
parameter allows you to specify which port the application listens on. The default value is 80
.
Recipes¶
Minimal amverum.yml file¶
meta:
environment: csharp
toolchain:
name: mono
version: latest
build:
mainFile: Program.cs