manifest.yml file is a YAML based schema definition of how to map external ports, directories, environment variables and various configuration options for your custom image.
manifest.yml is required with every custom image. The following describes the minimum parameters needed.
Example manifest.yml, all parameters displayed are required:
version: 1 image: label: my-custom-image type: www provider: 'My Account'
As you can see this is the minimum needed in a manifest.yml to build a custom image. The manifest.yml is generated when you create your custom image and some of the values are already pre-populated.
Usually you will need to expose or publish a port so that you can access your application. Exposed ports are only accessible to containers running on the same server, whereas published ports are opened on the server making them publicly available.
It's worth noting that published ports are automatically exposed, regardless of whether or not you set exposed to false.
Example manifest.yml exposing port 80 and publishing port 8080:
version: 1 image: label: my-custom-image type: www provider: 'My Account' ports: 80: exposed: true publish: false protocol: tcp 8080: exposed: true publish: true protocol: tcp
The port protocol can be either
The following example tells us how to mount the directories you have in your default-data and where they should be made accessible inside the image.
Example manifest.yml mounting directories: config, logs, application:
version: 1 image: label: my-custom-image type: www provider: 'My Account' volumes: config: mode: ro dest: /container/config logs: mode: rw dest: /container/logs application: mode: rw dest: /container/application
In this example, you can see that we are mounting the directories config, logs, and application. These are named exactly the same as their respective folders inside the default-data directory. You can also specify whether the mounted folder is read-only or not.
Sometimes it's useful to have environment variables which are used by your application, or if you would like to override a default system environment variable.
Example manifest.yml with environment variables:
version: 1 image: label: my-custom-image type: www provider: 'My Account' env_file: my_environment_variables: # the filename which will hold your environment variables vars: example_variable: # You need to assign a default_value for all custom images, but you can # overwrite them when creating the container via the Control Panel default_value: 'this will be the default value' # Another example of an environment variable remote_database: default_value: '127.0.0.1'
In this example we are creating two environment variables
remote_database which will be stored inside the environment file called
You can have as many variables as you like within each environment file, as well as multiple environment files defined in the manifest.yml. All environment variables must be of a key/value nature.
You can override defined environment variables using the environment variables functionality of our Control Panel.