Hey guys!
I'm trying to run a React app as a service, which is meant to bind to a test container (playwright). My code looks like:
reactApp := FrontendContainer.
WithExposedPort(3000).
AsService(dagger.ContainerAsServiceOpts{Args: []string{"npm", "run", "start"}})
test := PlaywrightContainer.
WithServiceBinding("ui", reactApp).
WithExec([]string{"sh", "-c", "npm run test; echo -n $? > /src/exit_code"}).
Stdout(ctx)
I can see that the npm run start is executed successful. But the test execution is failing with ERR_CONNECTION_REFUSED:
Error: page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
Call log:
- navigating to "http://localhost:3000/", waiting until "load"
I'm using Dagger 0.15.1. Do you know what is the issue here?