CODEFRESH.IO DOCUMENTATION

Codefresh is a Docker-native CI/CD platform.
Instantly build, test and deploy Docker images.

GET STARTED   GKE BETA

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Create composition

Composition can be launched as part of unit test step, integration test or for running an image for manual testing. Here is how to create a composition.

Create a composition by using the Codefresh UI

  1. Click the Composition view icon in the left pane, and click the Plus icon.
  1. In the Name text box, type a name for your composition.
click on image to enlarge

click on image to enlarge

  1. To add a service, click the Add Service button.

You can add existing built services, or provide the name for Docker image that will be pulled from Docker registry.

click on image to enlarge

click on image to enlarge

  1. (Optional) Click the Edit button to edit the content based on Docker Compose YAML .
click on image to enlarge

click on image to enlarge

  1. Click the Save icon on the upper right corner

Build command is not supported in Compositions

Please note, "build" command is not supported. Images are built as part of the services pipelines at the services module. The images can then added to the compositions with the "image" attribute.

Create a composition by using a Docker Compose YAML

  1. Click the Composition view icon in the left pane, and click the Plus icon.
  2. Toggle the Advance option to the on position.
click on image to enlarge

click on image to enlarge

  1. Copy and paste your existing docker-compose.yaml file.

# Let's Chat: Docker Compose
# https://docs.docker.com/compose/
#
# Usage: docker-compose up

app:
  image: sdelements/lets-chat:latest
  links:
    - mongo
  ports:
    - 80:8080
    - 5222:5222
  command: ls .


mongo:
  image: mongo:latest
  ports :
    - 27017:27017
click on image to enlarge

click on image to enlarge

Yaml validation error

In this example, the error message appears because the mapping ports are enabled only on the Pro payment plan. To fix this issue, leave the port number without mapping, in this example 27017 instead of 27017:27017

  1. Save the composition.

Great! You created a composition, run it !

Click the Launch icon.

The progress log window displays, and when the launch is complete, a link for running the environment displays.


Create composition

Composition can be launched as part of unit test step, integration test or for running an image for manual testing. Here is how to create a composition.