Skip to content

Instantly share code, notes, and snippets.

@tvon tvon/terraform.tf
Created Apr 3, 2016

Embed
What would you like to do?
provider "docker" {
host = "tcp://192.168.99.100:2376/"
}
## Containers
resource "docker_container" "flexo-gogs" {
image = "${docker_image.gogs.latest}"
name = "flexo-gogs"
}
resource "docker_container" "flexo-postgres" {
image = "${docker_image.postgres.latest}"
name = "flexo-postgres"
env {
POSTGRES_PASSWORD = "password"
POSTGRES_DB = "gogs"
}
volumes = {
host_path = "/home/tvon/dev/containers/terraform-flexo/volumes/postgres"
container_path = "/var/lib/postgresql/data"
}
}
# resource "docker_container" "flexo-drone" {
# image = "${docker_image.drone.latest}"
# name = "flexo-drone"
# }
#·
# resource "docker_container" "flexo-nginx" {
# image = "${docker_image.nginx.latest}"
# name = "flexo-nginx"
# }
## Images
resource "docker_image" "gogs" {
name = "gogs:latest"
}
resource "docker_image" "postgres" {
name = "postgres:9.5"
}
# resource "docker_image" "drone" {
# name = "drone:0.4"
# }
#·
# resource "docker_image" "nginx" {
# name = "nginx:latest"
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.