Server Config

Server config contains the settings for the Sloth CI server:

host: 0.0.0.0
port: 8080

auth: # or api_auth
    -   login: alice
        password: password
    -   login: bob
        password: secret

paths:
    access_log: /usr/log/sloth-ci/access.log
    error_log: /usr/log/sloth-ci/error.log

    db: /etc/sloth-ci/sloth.db

    configs:
        - /etc/conf.d/sloth-ci/*.yml

extensions:
    hide-from-robots:
        module: robots_txt

daemon: true

By default, Sloth CI tries to use a file called sloth.yml in the current directory as a server config, but you can specify a custom one with the -c param:

$ sci -c /path/to/myconfig.yml start

Host, Port

required

host: 0.0.0.0
port: 8080

The host and port for the Sloth CI server to run on.

Tip

To make the server accessible from the Internet, set host to 0.0.0.0.

API Access Credentials

auth: # or api_auth
    -   login: alice
        password: password
    -   login: bob
        password: secret

List of logins and passwords to access the Sloth CI API. Skipping this section lets anyone use your API without authentication (so be careful with it!).

If there’s only one pair, you may omit putting it in a list:

auth:
    login: john
    password: secret

New in version 2.0.4: Alias auth for api_auth was added.

Changed in version 2.0.8: Auth is now optional.

New in version 2.1.0: Auth section can hold multiple login:password pairs.

Paths

paths:
    access_log: /usr/log/sloth-ci/access.log
    error_log: /usr/log/sloth-ci/error.log

    db: /etc/sloth-ci/sloth.db

    configs:
        - /etc/conf.d/sloth-ci/*.yml

Tip

Use absolute paths. Relative paths work too, but absolute ones are more reliable.

access_log

Path to the log that records all incoming requests.

Default value: sloth_access.log

error_log

Path to the log that records app creation and extension loading errors, server startup and tier down info.

Default value: sloth_error.log

db

Path to the SQLite DB file to store the app logs in.

Default value: sloth.db

configs

List of paths to the app configs to load on server startup.

Items can be file paths or glob patterns:

configs:
    - /path/to/app.yaml
    - /path/to/configs/*.yml

No app configs are loaded by default.

Extensions

extensions:
    hide-from-robots:
        module: robots_txt

Server-level extension declarations.

A declaration has a unique name (hide-from-robots) and must contain the extension module name (robots_txt). Depending on the extension, a declaration can include additional params. For example, the mentioned Robots.txt extension has two optional params: file and path.

You can declare the same extension module multiple times under different names:

extensions:
    hide-from-robots:
        module: robots_txt
    robots-txt-on-a-different-path:
        module: robots_txt
        path: /static/robots.txt

No extensions are declared by default.

Note

The built-in API extension is silently loaded without declaration.

Daemon

daemon: true

Run Sloth CI as a daemon. Default is false.

Important

This params works only in UNIX-based systems. If you launch Sloth CI with daemon: true on Windows, it will crash.