Native Docker Compose

Compose override allows the use of native docker compose directives

The auterion-app.yml file defines the configuration your app and all the API configurations. While most things can be achieved with officially specified APIs, in some cases deeper system access is necessary. For this case, we offer the compose override API.

App installation process

An AuterionOS app is a collection of docker containers, in general spawned by docker compose. The docker compose file is automatically created from the auterion-app.yml during installation of the app on the Skynode.

Customizing the docker-compose

In general, there should be no need to customize the generated docker-compose file. However, for certain use-cases, it might be necessary. In order to do that, you can add the following part to your auterion-app.yml file:

auterion-app.yml
compose-override:
    services:
        my-service:
            # any docker-compose syntax is valid here

At the moment, all docker-compose properties are supported.

Some raw docker-compose overrides may become unavailable in future API versions, as we evolve the platform.

Example

For example, you may have the need to access a certain device from /dev on the host in your app, as well as elevate your apps privileges to talk to that device. You could achieve that with:

auterion-app.yml
compose-override:
    services:
        my-service:
            devices:
                - /dev/my-device:/dev/my-device
            device_cgroup_rules:
                - 'c 188:* rmw'

Default properties

Without specifying any compose-override properties in you auterion-app.yml file, your app will be configured with a set of default properties. Some of these defaults are:

  container_name: <app-name>.<my-service>
  image: <app-name>.<my-service>:<app-version>
  restart: unless-stopped
  extra_hosts:
    - auterion-host:host-gateway
  environment:
    - PYTHONUNBUFFERED=1
  volumes:
    - /data/app/app-name/data:/data
  env_file:
    - settings.default.env
    - settings.user.env

The behavior when providing compose-override properties is dependant on the version of app-configurator that you have installed on your device.

Starting with AuterionOS v3.5.3, user-specified properties will extend the values of that property if it can hold multiple values (e.g., volumes); single-value properties will be overwritten. For AuterionOS versions strictly older than v3.5.3, any user-specified property will overwrite all entries for that property, requiring you to repeat the default value if still needed.

Last updated

Change request #145: Add GPS denied