The cloud processing libraries have a storage folder to keep the current configuration.
Knowing how it works can help to create new instances with user defined default settings and presets.
Library API
The process_InitProcess has a "save_path" parameter.
This is where the presets, credentials and settings are saved.
NOTE: As stated in the documentation, if this parameter is null, then it uses volatile memory storage.
NOTE: the storage is handled on the process side, not the web server.
NOTE: when running, the process does not check for file changes, so it is not designed to be shared by multiple instances.
At startup, the library reads the content of this directory.
- If it is empty, it creates a default state.
- If not, it uses the files in this directory.
In this directory, there is (all readable files):
- auth.json : the authentication configuration, containing all users and passwords
- state.json : all the current settings :
- everything which is independent of on air preset
- the name of the on air preset
- current changes not saved in preset
- all user presets
At startup:
- if auth.json does not exist, it creates it with default credentials using the optional SETUP_USER/SETUP_SECRET or ADMIN_USER/ADMIN_SECRET environment variable or parameters (see Product Rights Management (Cloud and Web only) ).
- if state.json does not exist, it creates it with default settings and presets, and put on air the default preset
- if those files exist, the process reads them and initialize with their content
- existing presets are preserved