Skip to content

💨 A library for writing Docker Compose files in Dhall.

Notifications You must be signed in to change notification settings

pixura/dhall-docker-compose

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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 types = ./compose/v3/types.dhall
let defaults = ./compose/v3/defaults.dhall

in defaults.ComposeConfig // {
  -- your config here
} : types.ComposeConfig

Dev

  1. install dhall-to-yaml

    brew install dhall-json

  2. generate yaml

dhall-to-yaml < "example/docker-compose-deploy.dhall" --explain --omitNull > ./example/docker-compose-deploy.yml

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

About

💨 A library for writing Docker Compose files in Dhall.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dhall 100.0%