Aller au contenu principal

Configuration globale

The global configuration file is required for Remiz to work. You can specify the location of the file using the -g/--global_config_file command flag. If not specified, Remiz will look for the configuration file to be put in the same directory as the binary.

A configuration file includes at 2 sections:

  • all packagers to use when building/deploying
  • all stores in each you want to store/deploy from the artifact file.

Create your first global configuration

Create a toml file at where the binary is located, for example remiz/configuration.toml:

configuration.toml
[packagers]
copy_files = "packagers/copy_files.py"

[store]
local = "packages/{name}/{name}_v{version}.pack"

You will find an explanation for each line of the file below.

Packagers section

In this section, each value represents a packager. A Packager is a script or program that is in charge of copying files of your project in a 'magic' folder (when building) and also in charge of deploying the files when deploying.

In this example, copy_files is the name of the packager. You can name it as you like but you should keep in mind that you will have to use this name in the package configuration (next page).

The value of this attribute must be the path to the packager.

Tip

You should use the shebang syntax at the top of any packager that is interpreted. For example, in Python, the first line may be #!/usr/bin/env python3.

Store section

The [store] section defines all the locations where your package will be stored. It may be a local or a remote file system (via SFTP, ...). For now, only local storage is supported. In this example, local = "packages/{name}/{name}_v{version}.pack" will store all packages in packages/{name}/{name}_v{version}.pack path with all variables relative to the project substitued. For example, if the package name is 'foo' and version is '1.0.0', the final path will be packages/foo/foo_v1.0.0.pack. {name} and {version} are defined in the package configuration file. This topic is covered in the next page.