Skip to content

Applications

Deploying containers

Modern applications are usually made of one or more services. Each service is defined within the services section of the file.

For our first example, let's consider an application with one service and one replica, launched from a public docker image, and that does not require any interaction with the world nor any specific configuration settings.

services:
  frontend:
    image: nginx
    deploy:
      replicas: 1
  • frontend corresponds to the service name, it must be unique within each compose file.
  • image is the docker image used to create the container
  • deploy specifies the configuration for the deployment of services
    • replicas indicates that only one container replica is desired for this service.

Container size

The container size for a service can be set explicitly by defining the label io.levv.size within the service.labels section. When the container size is not specified, levv creates a deployment with a nano size by default.

services:
  frontend:
    image: nginx
    deploy:
      replicas: 1
    labels:
      io.levv.size: "large"

When specified, levv will translate the given size into specific resource quotas. If the provided value is incorrect, an error is generated and the deployment cannot be applied.

For available sizes and pricing, please refer to https://levv.io/pricing.