@@ -12,18 +12,17 @@ import (
1212 "github.com/docker/libcompose/config"
1313 "github.com/docker/libcompose/docker/auth"
1414 "github.com/docker/libcompose/docker/client"
15+ "github.com/docker/libcompose/docker/ctx"
1516 "github.com/docker/libcompose/docker/network"
17+ "github.com/docker/libcompose/docker/service"
1618 "github.com/docker/libcompose/docker/volume"
1719 "github.com/docker/libcompose/labels"
1820 "github.com/docker/libcompose/lookup"
1921 "github.com/docker/libcompose/project"
2022)
2123
22- // ComposeVersion is name of docker-compose.yml file syntax supported version
23- const ComposeVersion = "1.5.0"
24-
2524// NewProject creates a Project with the specified context.
26- func NewProject (context * Context , parseOptions * config.ParseOptions ) (project.APIProject , error ) {
25+ func NewProject (context * ctx. Context , parseOptions * config.ParseOptions ) (project.APIProject , error ) {
2726 if context .ResourceLookup == nil {
2827 context .ResourceLookup = & lookup.FileResourceLookup {}
2928 }
@@ -48,9 +47,7 @@ func NewProject(context *Context, parseOptions *config.ParseOptions) (project.AP
4847 }
4948
5049 if context .ServiceFactory == nil {
51- context .ServiceFactory = & ServiceFactory {
52- context : context ,
53- }
50+ context .ServiceFactory = service .NewFactory (context )
5451 }
5552
5653 if context .ClientFactory == nil {
@@ -86,7 +83,7 @@ func NewProject(context *Context, parseOptions *config.ParseOptions) (project.AP
8683 return nil , err
8784 }
8885
89- if err = context .open (); err != nil {
86+ if err = context .LookupConfig (); err != nil {
9087 logrus .Errorf ("Failed to open project %s: %v" , p .Name , err )
9188 return nil , err
9289 }
0 commit comments