In addition to our sloppy.io JSON format, we also offer you to deploy your apps using the YAML format. Think of it as a Docker Compose file with a few unique add-ons that allow for container orchestration, web hosting, health checks and much more. While you still need JSON when using the sloppy.io API directly, our YML format is the preferred way when using our CLI as it is pretty similar to the docker-compose format.

In this documentation we’ll walk you through building your applications using the sloppy.yml file format; and explain every single configuration option in detail.

Basic structure

To enable you to orchestrate even the most complex projects with numerous containers, the basic structure of the sloppy.yml configuration file consists of:

Project
Definition of exactly one project. 

Service(s)
Definition of one or multiple services.

Understanding sloppy.io Projects and Services

A sloppy.io project, for example a “web shop”, is a group of one or more sloppy.io services. These form logical units in your project describing technical services (e.g. “frontend” or “backend”) or other meaningful entities, like “encoding-service” or “database-service”. Each service itself comprises one or more components, called sloppy.io apps (here apache). Each app represents a single Docker container referencing its own image. These images can be one of the many public images from the Docker Hub or can be built by yourself. Here is a simple example, illustrating the basic structure of a sloppy.yml configuration file by defining a simple project called my-first-project.

version: "v1"
project: "my-first-project"
services:
  frontend:
    apache:
       image: sloppy/apache-php
       domain: "MY-DOMAIN.sloppy.zone"
       ports: 80
       cmd: "/app.sh"

For more examples please visit us on GitHub.

Did this answer your question?