System (User) Configuration¶
The system configuration is the main configuration file that defines global behaviour for Riptide, such as the proxy server configuration.
It is located under “<CONFIG>/config.yml”.
Schema¶
The Schema defines what the contents of the YAML configuration files are.
- classmethod schema() schema.Schema¶
- proxy
- url: str
Base-URL for the proxy server. The name of projects and/or services will be appended to it.
For example projectname.riptide.local would route to the project projectname if riptide.local is specified.
- ports
- http: int
HTTP port that the proxy server should listen on
- https: Or[int,bool]
HTTPS port that the proxy server should listen on, or false to disable HTTPS
- autostart: bool
Whether or not the proxy server should auto-start all services for a project if a user enters the URL for a service.
- [autostart_restrict]: List[str]
If set, only the IPv4 ip addresses specified by the netmasks in this list are allowed to trigger the auto-start process via the proxy server. For other clients, projects are not automatically started. Useful if you share a network with co-workers and don’t want them to start your projects.
- [compression]: bool
If true, the proxy server doesn’t decompress any data, and instead passes the compressed data of the backend server (if compressed). Experimental.
- engine: str
Engine to use, the Python package for the engine must be installed.
- repos: List[str]
List of URLs to Git repositories containing Riptide Repositories.
- update_hosts_file: Or[bool,str]
Whether or not Riptide should automatically update the system’s host file.
This may be set to string, in which case the string must be a path to a hosts file to update. If it is set to true, the system’s default hosts file is updated.
- [project]:
Project If a project is loaded, Riptide inserts the project here. Do not manually insert a project into the actual system configuration file.
- performance
Various performance optimizations that, when enabled, increase the performance of containers, but might have some other drawbacks.
Values can be true/false/auto. “auto” enables an optimization, if beneficial on your platform.
- dont_sync_named_volumes_with_host: Or[‘auto’,bool]
If enabled, volumes, that have a volume_name set, are not mounted to the host system and are instead created as volumes with the volume_name. Otherwise they are created as host path volumes only. Enabling this increases performance on some platforms.
Please note, that Riptide does not delete named volume data for old projects. Please consult the documentation of the engine, on how to do that.
“auto” enables this feature on Mac and Windows, when using the Docker container backend.
Switching this setting on or off breaks existing volumes. They need to be migrated manually.
- dont_sync_unimportant_src: Or[‘auto’, bool]
Normally all Commands and Services get access to the entire source directory of a project as volume. If this setting is enabled,
unimportant_pathsthat are defined in the App are not updated on the host system when changed by the volume. This means changes to these files are not available, but file access speeds may be drastically increased on some platforms.“auto” enables this feature on Mac and Windows, when using the Docker container backend.
This feature can be safely switched on or off. Projects need to be restarted for this to take effect.
- [hooks]
- {key}:
Hook Global hooks, these are available in all projects.
- {key}:
Example Document:
riptide: proxy: url: riptide.local ports: http: 80 https: 443 autostart: true autostart_restrict: - 127.0.0.1/32 engine: docker repos: - https://github.com/theCapypara/riptide-repo.git update_hosts_file: true performance: dont_sync_named_volumes_with_host: auto dont_sync_unimportant_src: auto hooks: [ ]
Helper Functions¶
Helper Functions (also called “Variable Helpers”) can be used in the configuration files to perform some advanced tasks.
- get_config_dir()¶
Returns the path to the Riptide system configuration directory
Example usage:
something: '{{ get_config_dir() }}'
Example result:
something: '/home/thomas/.config/riptide'
- get_plugin_flag(inp: str) Any¶
Returns the value (usually true/false, but can also be other data) of a flag set by a Riptide plugin.
If the flag or plugin is not found, false is returned.
- Parameters:
inp – plugin-name.flag-name