Apps

An app defines all the different services (sub-applications) and commands that are required to run a web development project for a specific framework or application.

An app consists of a number of services and commands, a list of files that can be imported during the initial setup and some usage notes.

Schema

The Schema defines what the contents of the YAML configuration files are.

classmethod App.schema() → schema.Schema[source]
name: str
Name describing this app.
[notices]
[usage]: str

Text that will be shown when the interactive setup wizard ist started.

This text should describe additional steps needed to finish the setup of the app and general usage notes.

[installation]: str

Text that will be shown, when the user selects a new installation (from scratch) for this app.

This text should explain how to execute the first-time-setup of this app when using Riptide.

[import]
{key}

Files and directories to import during the interactive setup wizard.

target: str
Target path that the file or directory should be imported to, relative to the directory of the riptide.yml
name: str
Human-readable name of this import file. This is displayed during the interactive setup and should explain what kind of file or directory is imported.
[services]
{key}: Service
Services for this app.
[commands]
{key}: Command
Commands for this app.
[unimportant_paths]: List[str]

Normally all files inside containers are shared with the host (for commands and services with role ‘src’). This list specifies files that don’t need to be synced with the host. This means, that these files will only be uploaded to the container on start and changes will not be visible on the host. Changes that are made on the host file system may also not be visible inside the container. This increases performance on non-native platforms (Mac and Windows).

This feature is only enabled if the system configuration performance setting dont_sync_unimportant_src is enabled. If the feature is disabled, all files are shared with the host. See the documentation for that setting for more information.

All paths are relative to the src of the project. Only directories are supported.

Example Document:

app:
  name: example
  notices:
    usage: Hello World!
  import:
    example:
      target: path/inside/project
      name: Example Files
  services:
    example:
      $ref: /service/example
  commands:
    example:
      $ref: /command/example

Helper Functions

Helper Functions (also called “Variable Helpers”) can be used in the configuration files to perform some advanced tasks.

App.parent() → Project[source]

Variable Helper

Can be used inside configuration files.

Returns the project that this app belongs to.

Example usage:

something: '{{ parent().src }}'

Example result:

something: '.'
App.get_service_by_role(role_name: str) → Optional[riptide.config.document.service.Service][source]

Variable Helper

Can be used inside configuration files.

Returns any service with the given role name (first found) or None.

Example usage:

something: '{{ get_service_by_role("main")["$name"] }}'

Example result:

something: 'service1'
Parameters:role_name – Role to search for
App.get_services_by_role(role_name: str) → List[riptide.config.document.service.Service][source]

Variable Helper

Can be used inside configuration files.

Returns all services with the given role name.

Parameters:role_name – Role to search for