Hey all,
this is almost defiantly a problem with my understanding of how this should work.
Pretty much I have 3 services, a db , a migration service and then a swagger service.
The migration service is running as intended and the swagger is accessible but I can seem to get swagger to hit the db.
Here's the gist of the setup
func (i *Integration) TestSwagger(ctx context.Context, src *dagger.Directory) (*dagger.Service, error) {
db, err := i.postgresDB().
Start(ctx)if err != nil { return nil, err } defer db.Stop(ctx) // adds db as service : WithServiceBinding("db", db). server, err := i.swagger(db, src). Start(ctx) if err != nil { return nil, err } // adds db as service : WithServiceBinding("db", db). migration, err := i.migrationService(src, db). Start(ctx) if err != nil { return nil, err } defer migration.Stop(ctx) return server, nil}
Here's the whole file : https://github.com/bardic/gocrib/blob/feature/dagger/integration/.dagger/main.go
Any thoughts or directions to investigate would be much appreciated!