You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide in-network connection details from modules #1567
Module getters return the address as seen from the test process: the Docker host and a mapped port. A second container on the same Docker network needs a different address, the first container's network alias and its internal port, and no module provides it.
constdb=awaitnewPostgreSqlContainer(image).withNetwork(network).withNetworkAliases("db").start();db.getConnectionUri();// postgres://test:test@localhost:55012/test, no use to another containerconstapp=awaitnewGenericContainer(appImage).withNetwork(network).withEnvironment({DATABASE_URL: "postgres://test:test@db:5432/test"})// assembled by hand.start();
The module knows the internal port, the credentials and the database name. The user has to repeat all of them, and keep them in step with the module's defaults.
Expected
Each module can produce its connection details for use inside a network:
Activity