Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.07 KB

README.md

File metadata and controls

40 lines (26 loc) · 1.07 KB

dhall-docker-compose

A library for writing Docker Compose files in Dhall.

Note: Only version 3.0 of the Docker Compose config is supported currently.

If you wish to add another version it is probably worth spending the time to write a json-spec to dhall converter. See dhall-kubernetes' generator.

Why?

To experiment with Dhall for config.

Usage

-- for the imports in your docker-compose.dhall file you should either download
-- the dhall files or use the URL imports.
let Compose = ./compose/v3/package.dhall

in Compose.Config::{
  -- your config here
}

Dev

  1. install dhall-to-yaml

    brew install dhall-json

  2. generate yaml

dhall-to-yaml --file example/docker-compose-deploy.dhall --output ./example/docker-compose-deploy.yml --explain

Note that the yaml keys are alphabetized in the generated yaml.