Use Docker Compose

JFrog Connect integration with Docker Compose enables you to utilize Docker Compose's exceptional capabilities to deploy multiple containers to IoT devices.

Overview

Connect enables you to deploy multiple containers by using Docker Compose capabilities. When you choose Docker Compose as your Deployment Type, JFrog Connect will upload the corresponding YAML file to Artifactory, and the edge device will pull it during the update.

The recommended approach to managing containers on edge devices is to use Docker Compose.

Prerequisites

  • JFrog Platform Account. (You receive an account with JFrog Platform automatically when you register for a JFrog Connect account.)

  • Connect Agent 6.0 or later on device(s).

  • Docker and Docker Compose installed on your device(s).

  • A Docker Compose configuration file located in Artifactory.

  • Completed the procedures in Deploy Container.

Configure Docker Compose Options

Destination Path on Device

Enter the path where the Docker Compose file should be placed on the IoT device. The folder must already exist on this path or the update will fail. (You can create a folder using the Run Command action block.)

Docker Compose File

Drag and drop, or browse to select the Docker Compose file to be used. If you run deployments again using the workflow with this action block, this file will be used again. If you want to run deployments that use a different Docker Compose file, use JFrog Artifactory Path with a variable.

Artifactory Path

Enter the path of your Docker Compose file in Artifactory. If you plan to run several deployments using this workflow, we recommend entering a variable, e.g., {{artifactory-path}} for this field. This would enable you to deploy the same workflow many times, changing the value of the Artifactory path with each deployment when prompted.

Configure On Failure Options

Configure your On Failure policy and instructions for rolling back, if necessary.

On Failure enables you to define what happens upon failure of the JFrog Containers block. By default, when the block fails the Docker Compose file is automatically reverted, and everything is restored to its previous state.

Failures that are caused by container logic (e.g., Command fails or Invalid image architecture) are handled by the Docker Compose binary and are not regarded as a block failure.

Restart Settings

It is recommended to add restart: always to your service configurations in order to ensure that Docker Compose automatically restarts the service(s).

Complete the Configuration

Save your action block configuration.

If you are adding more action blocks to the workflow, continue to the next one. Otherwise, complete your workflow configuration and save it.

What’s Next?

Last updated