Integrations
Container integration configuration exposes multiple integration options to users.
To navigate to a container integration settings go to any container and select the Config
navigation option. From there select Integrations
from the sub menu.
There are four options when setting up container integrations:
Files
The files integration has a Source
and Destination
setting for each entry. The source entry is an endpoint serving the files and the destination is where the file should be written to in the container.
Shared Directories
Shared directories allow for a shared directory between containers running on the same host.
These directories are defined as identifiers in the server configuration.
This integration has three parts:
- Identifier - think of this as a key that can be used to identify which directory you'd like the given container to have access to.
- Writable - a boolean where true means the given container can write to the directory.
- Mount Point - where in the container to mount the shared directory.
The mount point can be a directory that does not yet exist on the container. For example /app/shared
can be used and if that directory does not exist on the host it will be added.
Let's Encrypt
Allows the user to control where TLS certificates are installed for a container. Using this option on a container means that you'll be reserving a specific inbound port as the loadbalancer will have no information other than port to route the traffic if the connection is still encrypted.
To create a TLS certificate, you'll need to set up a DNS Zone. This doesn't mean that the container needs to have public networks enabled.
Choosing the checkbox under enable will install all four options to the default location /var/run/cycle/tls/*
where *
represents the specific asset path. If you wish to change which files are copied to your container, and the path they are copied to - simply click the customize checkbox next to the files you want and fill in the path you wish to install the certs to or leave the default path in place.
Webhooks
The integration webhooks represent the 4 different types of events that can be hooked into for this container.
start - An endpoint to hit when the container starts. stop - An endpoint to hit when the container stops. deploy - An endpoint to his when a deploy event happens (tied to stack deployments). config - An endpoint that hosts a container config object to be used for granular configuration changes at runtime.
Backups
Stateful containers on Cycle can be set to automatically be backed up. Currently, this integration relies on setting up Backblaze as a hub level integration.
After setting up container backups, using the aforementioned guide, a user can see all backups of a stateful container using the "Backups" option available in the container modal's main navigation.
Viewing Backups
To view a backup, navigate to the container that has been backed up and select the "Backups" option from the container modal navigation.
Here you will see all backups that have been created for the given container, basic information about the backup, and data log with output from stderr
.
Some programs print error messages to stdout
instead of stderr
, to hedge against missing errors in the backup log Cycle will look for backup exit codes of not 0
and scan the last 1kb of stdout
if stderr
is empty.