© 2026 Hedgehog Software, LLC
@effect-ts/core/Effect/Managed
Layer.scoped
Layer.scoped( PostgresContainer, Effect.acquireRelease( Effect.promise(() => new PostgreSqlContainer('postgres:16.3-alpine') .withWaitStrategy( Wait.forAll([ Wait.forListeningPorts(), Wait.forLogMessage( /.*database system is ready to accept connections.*/, 2, ), ]), ) .start(), ), (container: StartedPostgreSqlContainer) => Effect.promise(() => container.stop()), ), ),