Skip to content

Instantly share code, notes, and snippets.

@someara
Last active September 7, 2015 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save someara/24edc8b969207fb55d7b to your computer and use it in GitHub Desktop.
Save someara/24edc8b969207fb55d7b to your computer and use it in GitHub Desktop.
# container A
template '/some/Dockerfile' do
action :create
end
template '/some/file' do
action :create
end
docker_image 'databass' do
subscribes :build, 'template[/some/Dockerfile]'
subscribes :build, 'template[/some/file]'
action :build_if_missing
end
docker_container 'my_databass' do
repo 'databass'
action :run
subscribes :redeploy, 'docker_image[databass]'
end
# container B
template '/someother/Dockerfile' do
action :create
end
template '/someother/file' do
action :create
end
docker_image 'web' do
subscribes :build, 'template[/someother/Dockerfile]'
subscribes :build, 'template[/someother/file]'
action :build_if_missing
end
docker_container 'my_web' do
repo 'web'
link 'my_databass:my_databass'
action :run
subscribes :redeploy, 'docker_image[web]'
subscribes :redeploy, 'docker_container[my_databass]'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment