Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbdchd/dhall-docker-compose
:dash: A library for writing Docker Compose files in Dhall.
https://github.com/sbdchd/dhall-docker-compose
dhall dhall-lang docker-compose yaml
Last synced: about 21 hours ago
JSON representation
:dash: A library for writing Docker Compose files in Dhall.
- Host: GitHub
- URL: https://github.com/sbdchd/dhall-docker-compose
- Owner: sbdchd
- Created: 2019-07-10T03:21:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T12:14:41.000Z (3 months ago)
- Last Synced: 2024-08-04T04:05:39.860Z (3 months ago)
- Topics: dhall, dhall-lang, docker-compose, yaml
- Language: Dhall
- Homepage:
- Size: 27.3 KB
- Stars: 25
- Watchers: 3
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-dhall - dhall-docker-compose - A library for writing Docker Compose files in Dhall. (Libraries)
README
# dhall-docker-compose
> A library for writing [Docker Compose](https://docs.docker.com/compose/)
> files in [Dhall](https://dhall-lang.org).**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](https://github.com/dhall-lang/dhall-kubernetes).## Why?
To experiment with Dhall for config.
## Usage
```dhall
-- 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.dhallin Compose.Config::{
-- your config here
}
```## Dev
1. [install dhall-to-yaml](https://github.com/dhall-lang/dhall-lang/wiki/Getting-started%3A-Generate-JSON-or-YAML#os-x---install-using-brew)
> `brew install dhall-json`
2. generate yaml
```sh
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.