Example using Redis

Example Yaml configuration for a project with a Redis service dependency. Note that the redis service will be available at redis:6379.

pipeline:
  build:
    image: redis
    commands:
      - redis-cli -h redis ping
      - redis-cli -h redis set FOO bar
      - redis-cli -h redis get FOO

services:
  redis:
    image: redis

If you are unable to connect to the redis container please make sure you are giving redis adequate time to initialize and begin accepting connections.

pipeline:
  build:
    image: redis:3.0
    commands:
+     - sleep 5
      - redis-cli -h redis ping
      - redis-cli -h redis set HELLO hello
      - redis-cli -h redis get HELLO

services:
  redis:
    image: redis:3.0

Questions?

We are always happy to help with questions you might have. Search our documentation or check out answers to common questions. You can also post questions or comments to our community forum.