Go

This configuration is suitable if the project is made in Go.

You can write a yaml file yourself using the instructions below, or use our yaml generator by following the 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: golang
  toolchain:
    name: go
    version: 1.22

Of the parameters that can be changed here is meta.toolchain.version. Logically, this is the version of the Go compiler 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. You can use a higher version of the compiler, for example: at home on your computer you use 1.21, if you try to build your project in Amverum with the image 1.22 - everything will work for you.

For the build and run phase, it is golang:${meta.toolchain.version}. Valid values can be seen on the [docker hub] page.(https://hub.docker.com/).

Important :class: warning

The meta.toolchain.version value must be valid for both the build and run phases. A simple LTS version number is best.

Section build

The following parameters can be specified in the build section:

  • image

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);

run section

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: golang
  toolchain:
    name: go
    version: 1.22