Skip to content

Instantly share code, notes, and snippets.

@garethr
Created August 4, 2018 10:10
Show Gist options
  • Save garethr/1f8f06252b0aba89fe6ba6d6f9faad14 to your computer and use it in GitHub Desktop.
Save garethr/1f8f06252b0aba89fe6ba6d6f9faad14 to your computer and use it in GitHub Desktop.
Experimenting with an HCL definition for Compose
object {
attr "version" {
type = string
required = true
}
block_map "services" {
block_type = "service"
labels = ["name"]
object {
attr "image" {
type = string
}
attr "build" {
type = string
}
attr "ports" {
type = list(string)
}
}
}
}
version = "3"
service "web" {
build = "."
ports = ["5000:5000"]
}
service "redis" {
image = "redis:alpine"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment