convox.yml

convox.yml is a manifest used to describe your application and all of its infrastructure needs.

    environment:
      - COMPANY=Convox
      - DOCS_URL
    appSettings:
      awsLogs:
        cwRetention: 31
        disableRetention: false
    resources:
      database:
        type: postgres
        options:
          storage: 200
      queue:
        type: redis
    services:
      api:
        annotations:
          - test.annotation.org/value=foobar
        build: .
        command: bin/api
        environment:
          - ENCRYPTION_KEY
        health: /check
        internal: true
        port: 3000
        resources:
          - database
          - queue
        termination:
          grace: 45
        test: make test
        timeout: 120
        deployment:
          minimum: 50
          maximum: 200
      web:
        build: .
        command: bin/web
        environment:
          - SESSION_SECRET
        port: 3000
      worker:
        build: ./worker
        command: bin/worker
        environment:
          - ENCRYPTION_KEY
        resources:
          - database
          - queue
      metrics:
        agent: true
        image: awesome/metrics
    timers:
      cleanup:
        schedule: "0 3 * * * *"
        command: bin/cleanup
        service: worker

environment

The top-level environment section defines Environment Variables that are available to every Service.

    environment:
      - COMPANY=Convox  # has a default value of "Convox"
      - DOCS_URL        # must be set before deployment

See Environment Variables for configuration options.

app settings

The appSettings section defines settings that apply exclusively to a particular app within the rack. These settings are independent of the global rack-level parameters and provide a mechanism for tailoring configuration to individual applications.

    appSettings:
      awsLogs:
        cwRetention: 31
        disableRetention: false

See App Settings for configuration options.

resources

The resources section defines network-accessible Resources such as databases that can be made available to Services.

    resources:
      database:
        type: postgres
        options:
          storage: 200

See Resource for configuration options.

services

The services section horizontally-scalable Services that can be optionally placed behind a load balancer.

    services:
      api:
        build: .
        command: bin/api
        environment:
          - ENCRYPTION_KEY
        health: /check
        internal: true
        port: 3000
        resources:
          - database
          - queue
        test: make test

See Service for configuration options.

timers

The timers section defines Processes that run periodically on a set interval.

    timers:
      cleanup:
        schedule: "0 3 * * * *"
        command: bin/cleanup
        service: worker

See Timer for configuration options.