b7daa2f3a4
Update traefik dependencies (docker/docker and related) - Update dependencies - Fix compilation problems - Remove vdemeester/docker-events (in docker api now) - Remove `integration/vendor` - Use `testImport` - update some deps. - regenerate the lock from scratch (after a `glide cc`)
22 lines
751 B
Go
22 lines
751 B
Go
package project
|
|
|
|
import (
|
|
"golang.org/x/net/context"
|
|
|
|
"github.com/docker/libcompose/project/events"
|
|
"github.com/docker/libcompose/project/options"
|
|
)
|
|
|
|
// Up creates and starts the specified services (kinda like docker run).
|
|
func (p *Project) Up(ctx context.Context, options options.Up, services ...string) error {
|
|
if err := p.initialize(ctx); err != nil {
|
|
return err
|
|
}
|
|
return p.perform(events.ProjectUpStart, events.ProjectUpDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) {
|
|
wrapper.Do(wrappers, events.ServiceUpStart, events.ServiceUp, func(service Service) error {
|
|
return service.Up(ctx, options)
|
|
})
|
|
}), func(service Service) error {
|
|
return service.Create(ctx, options.Create)
|
|
})
|
|
}
|