Skip to content

Commit

Permalink
Add clickhouse to docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
langchain-infra committed Jan 17, 2024
1 parent ca82dcd commit 1d0af6e
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
24 changes: 23 additions & 1 deletion js/src/cli/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3"
version: "4"
services:
langchain-playground:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-playground:${_LANGSMITH_IMAGE_VERSION:-latest}
Expand All @@ -25,6 +25,7 @@ services:
depends_on:
- langchain-db
- langchain-redis
- clickhouse-setup
langchain-queue:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-backend:${_LANGSMITH_IMAGE_VERSION:-latest}
environment:
Expand Down Expand Up @@ -67,6 +68,27 @@ services:
- 63791:6379
volumes:
- langchain-redis-data:/data
langchain-clickhouse:
image: clickhouse/clickhouse-server:23.9
user: "101:101"
restart: always
environment:
- CLICKHOUSE_DB=default
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=password
volumes:
- langchain-clickhouse-data:/var/lib/clickhouse
- ./users.xml:/etc/clickhouse-server/users.d/users.xml
ports:
- 8124:8123
- 9001:9000
clickhouse-setup:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-backend:${_LANGSMITH_IMAGE_VERSION:-latest}
depends_on:
- langchain-clickhouse
restart: "no"
entrypoint: [ "bash", "-c", "sleep 60 && migrate -source file://clickhouse/migrations -database 'clickhouse://langchain-clickhouse:9000?username=default&password=password&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree' up"]
volumes:
langchain-db-data:
langchain-redis-data:
langchain-clickhouse-data:
10 changes: 10 additions & 0 deletions js/src/cli/users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<clickhouse>
<users>
<default>
<access_management>1</access_management>
<named_collection_control>1</named_collection_control>
<show_named_collections>1</show_named_collections>
<show_named_collections_secrets>1</show_named_collections_secrets>
</default>
</users>
</clickhouse>
24 changes: 23 additions & 1 deletion python/langsmith/cli/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3"
version: "4"
services:
langchain-playground:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-playground:${_LANGSMITH_IMAGE_VERSION:-latest}
Expand All @@ -25,6 +25,7 @@ services:
depends_on:
- langchain-db
- langchain-redis
- clickhouse-setup
langchain-queue:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-backend:${_LANGSMITH_IMAGE_VERSION:-latest}
environment:
Expand Down Expand Up @@ -67,6 +68,27 @@ services:
- 63791:6379
volumes:
- langchain-redis-data:/data
langchain-clickhouse:
image: clickhouse/clickhouse-server:23.9
user: "101:101"
restart: always
environment:
- CLICKHOUSE_DB=default
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=password
volumes:
- langchain-clickhouse-data:/var/lib/clickhouse
- ./users.xml:/etc/clickhouse-server/users.d/users.xml
ports:
- 8124:8123
- 9001:9000
clickhouse-setup:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-backend:${_LANGSMITH_IMAGE_VERSION:-latest}
depends_on:
- langchain-clickhouse
restart: "no"
entrypoint: [ "bash", "-c", "sleep 60 && migrate -source file://clickhouse/migrations -database 'clickhouse://langchain-clickhouse:9000?username=default&password=password&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree' up"]
volumes:
langchain-db-data:
langchain-redis-data:
langchain-clickhouse-data:
10 changes: 10 additions & 0 deletions python/langsmith/cli/users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<clickhouse>
<users>
<default>
<access_management>1</access_management>
<named_collection_control>1</named_collection_control>
<show_named_collections>1</show_named_collections>
<show_named_collections_secrets>1</show_named_collections_secrets>
</default>
</users>
</clickhouse>

0 comments on commit 1d0af6e

Please sign in to comment.