Skip to content

Commit b263dad

Browse files
Merge branch 'main' into release-11.0.0
2 parents 5111f7e + 4471f40 commit b263dad

File tree

50 files changed

+1381
-1001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1381
-1001
lines changed

docs/features/compose.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ const environment = await new DockerComposeEnvironment(composeFilePath, composeF
4141
.up();
4242
```
4343

44+
### With a default wait strategy
45+
46+
By default Testcontainers uses the "listening ports" wait strategy for all containers. If you'd like to override
47+
the default wait strategy for all services, you can do so:
48+
49+
```javascript
50+
const environment = await new DockerComposeEnvironment(composeFilePath, composeFile)
51+
.withDefaultWaitStrategy(Wait.forHealthCheck())
52+
.up();
53+
```
54+
4455
### With a pull policy
4556

4657
Testcontainers will automatically pull an image if it doesn't exist. This is configurable:

docs/modules/clickhouse.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# ClickHouse Module
2+
3+
[ClickHouse](https://clickhouse.com/) is a column-oriented database management system for online analytical processing (OLAP) that allows users to generate analytical reports using SQL queries in real-time.
4+
5+
## Install
6+
7+
```bash
8+
npm install @testcontainers/clickhouse --save-dev
9+
```
10+
11+
## Examples
12+
13+
<!--codeinclude-->
14+
[Connect and execute query:](../../packages/modules/clickhouse/src/clickhouse-container.test.ts) inside_block:connectWithOptions
15+
<!--/codeinclude-->
16+
17+
<!--codeinclude-->
18+
[Connect using URL and execute query:](../../packages/modules/clickhouse/src/clickhouse-container.test.ts) inside_block:connectWithUrl
19+
<!--/codeinclude-->
20+
21+
<!--codeinclude-->
22+
[Connect with username and password and execute query:](../../packages/modules/clickhouse/src/clickhouse-container.test.ts) inside_block:connectWithUsernameAndPassword
23+
<!--/codeinclude-->
24+
25+
<!--codeinclude-->
26+
[Set database:](../../packages/modules/clickhouse/src/clickhouse-container.test.ts) inside_block:setDatabase
27+
<!--/codeinclude-->
28+
29+
<!--codeinclude-->
30+
[Set username:](../../packages/modules/clickhouse/src/clickhouse-container.test.ts) inside_block:setUsername
31+
<!--/codeinclude-->
32+
33+
### Connection Methods
34+
35+
The module provides several methods to connect to the ClickHouse container:
36+
37+
1. `getClientOptions()` - Returns a configuration object suitable for `@clickhouse/client`:
38+
```typescript
39+
{
40+
url: string; // HTTP URL with host and port
41+
username: string; // Container username
42+
password: string; // Container password
43+
database: string; // Container database
44+
}
45+
```
46+
2. `getConnectionUrl()` - Returns a complete HTTP URL including credentials and database:
47+
```
48+
http://[username[:password]@][host[:port]]/database
49+
```
50+
3. `getHttpUrl()` - Returns the base HTTP URL without credentials:
51+
```
52+
http://[host[:port]]
53+
```
54+
55+
These methods can be used with the `@clickhouse/client` package or any other ClickHouse client.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ nav:
5151
- Azurite: modules/azurite.md
5252
- Cassandra: modules/cassandra.md
5353
- ChromaDB: modules/chromadb.md
54+
- ClickHouse: modules/clickhouse.md
5455
- CosmosDB: modules/cosmosdb.md
5556
- Couchbase: modules/couchbase.md
5657
- CockroachDB: modules/cockroachdb.md

0 commit comments

Comments
 (0)