Skip to content

Commit

Permalink
Add support for volumes_from to the apps, templates and services cont…
Browse files Browse the repository at this point in the history
…rollers.
  • Loading branch information
rupakg committed Oct 2, 2014
1 parent c9443da commit 8ececad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/controllers/apps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def app_params
environment: [[:variable, :value, :required]],
ports: [[:host_interface, :host_port, :container_port, :proto]],
expose: [],
volumes: [[:host_path, :container_path]]
volumes: [[:host_path, :container_path]],
volumes_from: [[:service]]
)
end

Expand Down
1 change: 1 addition & 0 deletions app/controllers/services_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def service_params(extras=nil)
ports: [[:host_interface, :host_port, :container_port, :proto]],
expose: [],
volumes: [[:host_path, :container_path]],
volumes_from: [[:service_id]],
links: [[:service_id, :alias]],
environment: [[:variable, :value, :required]]
)
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def template_create_params
expose: [],
links: [[:service_id, :alias]],
environment: [[:variable, :value, :required]],
links: [[:service_id, :alias]],
ports: [[:host_interface, :host_port, :container_port, :proto]]
ports: [[:host_interface, :host_port, :container_port, :proto]],
volumes_from: [[:service_id]]
]]
)
end
Expand Down
1 change: 1 addition & 0 deletions spec/controllers/templates_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
{ 'variable' => 'GIT_REPO', 'value' => 'https://github.com/fermayo/hello-world-php.git' }
],
'volumes' => [],
'volumes_from' => [{ 'service_id' => '3' }],
'command' => '/start web'
}
]
Expand Down

0 comments on commit 8ececad

Please sign in to comment.