Services

YAML tags for services block

The services tag is intended to be used to run applications alongside the pipeline.

---
# This document is displaying all the required tags
# to run a postgres database for the duration of a pipeline.
services: 
  - name: postgres
    image: postgres:latest

Tags

TagRequiredTypeDescription
nameYstringUnique identifier for the container in the pipeline
imageYstringDocker image used to create an ephemeral container
pullNstringDeclaration to configure if and when the Docker image is pulled
environmentNmap
entrypointN[]stringCommands to execute inside the container
portsNstringList of ports to map for the container in the pipeline
ulimitsN[]stringSet the user limits for the container
userNstringSet the user for the container.

Usage

The name: tag

---
services: 
    # Unique identifier for the container in the pipeline.
  - name: postgres

The image: tag

---
services: 
    # Docker image used to create ephemeral container.
  - image: postgres:latest

The pull: tag

---
services: 
    # Declaration to configure if and when the Docker image is pulled.
    # By default, the compiler will inject pull but accepts the 
    # following values: always, never, no_present, on_start, 
  - pull: always

The environment: tag

---
services: 
    # Variables to injected into the container environment
    # using a map style syntax.
  - environment:
      DB_NAME: vela
---
services: 
    # Variables to injected into the container environment
    # using an array style syntax.
  - environment:
      - DB_NAME=vela

The entrypoint: tag

---
services: 
    # Commands to execute inside the container.
  - entrypoint:
      - some/path/sql-init.sql
      - /some/binary/postgres

The ports: tag

---
services: 
    # List of ports to map for the container in the pipeline.
  - ports: 
      - "8080:5432"

The ulimits: tag

---
services:
    # Set the user limits for the container.
  - ulimits:
      - name: foo
        soft: 1024
      - name: bar
        soft: 1024
        hard: 2048

The user: tag

---
services:
    # Run the container with the foo user.
  - user: foo
Last modified August 17, 2022: Fix steps->services (#315) (282a39e7)