Method: Docker::Compose::Session#up

Defined in:
lib/docker/compose/session.rb

#up(*services, detached: false, timeout: 10, build: false, no_build: false, no_deps: false) ⇒ true

Idempotently up the given services in the project.

Parameters:

  • services (Array)

    list of String service names to run

  • detached (Boolean) (defaults to: false)

    if true, to start services in the background; otherwise, monitor logs in the foreground and shutdown on Ctrl+C

  • timeout (Integer) (defaults to: 10)

    how long to wait for each service to start

  • build (Boolean) (defaults to: false)

    if true, build images before starting containers

  • no_build (Boolean) (defaults to: false)

    if true, don’t build images, even if they’re missing

  • no_deps (Boolean) (defaults to: false)

    if true, just run specified services without running the services that they depend on

Returns:

  • (true)

    always returns true

Raises:

  • (Error)

    if command fails



79
80
81
82
83
84
85
86
87
88
# File 'lib/docker/compose/session.rb', line 79

def up(*services,
       detached: false, timeout: 10, build: false, no_build: false, no_deps: false)
  o = opts(d: [detached, false],
           timeout: [timeout, 10],
           build: [build, false],
           no_build: [no_build, false],
           no_deps: [no_deps, false])
  run!('up', o, services)
  true
end