start

With the sloppy start command you can start a project along with all services and applications that are included. In order to do so, you first have to define your project and its components (services and apps) using either the sloppy.io JSON format or a docker-compose.yml.

You can learn more about how to create projects, services and applications on the sloppy YAML reference page and the reference page on creating an application.

Usage

JSON file

The general syntax of the sloppy start command using the JSON format is as follows:

$ sloppy start [OPTIONS] JSONfile

Options

The following options will work in conjunction with the sloppy start command providing a JSON file: --help shows help for the command, --var replaces environment variables in the JSON file (e.g. the domain name). 

Using the --var option allows you to quickly re-use and adapt an existing sloppy.json. Instead of changing the JSON file itself, simply replace the environment variables specified in the JSON (e.g. domain names or user ID and password for a database) with new values.

docker-compose.yml

You can also use a docker-compose.yml for sloppy start:

$ sloppy start [OPTIONS] docker-compose.yml

Options

The following options will work in conjunction with the sloppy start command providing a JSON file: --help shows help for the command, -p specifies the project name.

Limitations

Note that using docker-compose.yml comes with some limitations: Any build: . instruction doesn't work, since it requires local files. You can work around this using image instead. Also, health checks are not supported. We recommend using a JSON file (see above) instead.

Output

Once you have executed the sloppy start command, it will return the applications contained within the project and its versions, like in this example:

Start

Sample Description

$ sloppy start wordpress.json

+----------+--------+--------+--------------+
| SERVICE  | # APPS | STATUS | TOTAL MEMORY |
+----------+--------+--------+--------------+
| frontend |      1 |  0 / 1 |      512 MiB |
| backend  |      1 |  0 / 1 |      512 MiB |
+----------+--------+--------+--------------+

What does this information tell you?
In the example output above the project we have started is called “wordpress” and contains two services, which have one application each and for each application we assigned 512 MB RAM. The status column shows the state of the applications.

| Please note, that every time you run the sloppy start command the sloppy.io API server checks upon the integrity of the sloppy.json provided.

| However, even when your sloppy.json is correct, there still might be another problem that keeps your project and the apps included from starting. Please use the sloppy logs command after starting your project to make sure it is up and running.

Did this answer your question?