Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 209 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# WARNING to run this you need to ensure that vm.max_map_count is correctly configured
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are introducing a new docker compose file and not updating the existing ones :

  • docker-compose-langfuse-only.yml : that already contains langfuse v2
  • docker-compose-rag-with-langfuse.yml : that already contains langfuse v2

# See https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker#important-host-settings
# We recommande having at least 40Gb free space on your disk to prevent this error : https://stackoverflow.com/a/67767478
# If you have less and something goes wrong at the cluster boot check that you don't have any logs "high disk watermark [90%] exceeded"
# if so make some free space a few Gb until this error desapear.
version: "3"

services:
mongo:
image: "${PLATFORM}mongo:${MONGO}"
volumes:
- tockmongo:/data/db
ports:
- "27017:27017"
command: --bind_ip_all --port 27017 --replSet "tock"

mongo2:
image: "${PLATFORM}mongo:${MONGO}"
depends_on:
- mongo
volumes:
- tockmongo2:/data/db
ports:
- "27018:27018"
command: --bind_ip_all --port 27018 --replSet "tock"

mongo3:
image: "${PLATFORM}mongo:${MONGO}"
depends_on:
- mongo
- mongo2
volumes:
- tockmongo3:/data/db
ports:
- "27019:27019"
command: --bind_ip_all --port 27019 --replSet "tock"

mongo-setup:
image: "${PLATFORM}mongo:${MONGO}"
depends_on:
- "mongo"
- "mongo2"
- "mongo3"
links:
- mongo:mongo
- mongo2:mongo2
- mongo3:mongo3
volumes:
- ./scripts:/scripts
environment:
- MONGO1=mongo
- MONGO2=mongo2
- MONGO3=mongo3
- RS=tock
entrypoint: [ "/scripts/setup.sh" ]

build_worker:
image: "${PLATFORM}tock/build_worker:${TAG}"
depends_on:
- mongo
- mongo2
- mongo3
environment:
- tock_mongo_url=mongodb://mongo:27017,mongo2:27018,mongo3:27019/?replicaSet=tock
- tock_env=prod
- JAVA_ARGS=-Xmx1g -XX:MaxMetaspaceSize=256m

duckling:
image: "${PLATFORM}tock/duckling:${TAG}"
environment:
- tock_env=prod
expose:
- "8080"

kotlin_compiler:
image: "${PLATFORM}tock/kotlin_compiler:${TAG}"
environment:
- tock_env=prod
- tock_kotlin_compiler_classpath=/maven
ports:
- "8887:8080"

langfuse-worker:
image: docker.io/langfuse/langfuse-worker:3
restart: always
depends_on:
- langfuse_postgres
- clickhouse
- minio
- redis
environment: &langfuse_env
# UI Langfuse
NEXTAUTH_URL: http://localhost:3000

# Postgres Langfuse
DATABASE_URL: postgresql://langfuse:ChangeMe@langfuse_postgres:5432/langfuse

# Secrets
SALT: mysalt
# Generate via `openssl rand -hex 32`
ENCRYPTION_KEY: CHANGEME

TELEMETRY_ENABLED: "true"
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: "false"

# Clickhouse
CLICKHOUSE_MIGRATION_URL: clickhouse://clickhouse:9000
CLICKHOUSE_URL: http://clickhouse:8123
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: clickhouse
CLICKHOUSE_CLUSTER_ENABLED: "false"

# Redis
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_AUTH: myredissecret

# S3 / Minio
LANGFUSE_S3_EVENT_UPLOAD_BUCKET: langfuse
LANGFUSE_S3_EVENT_UPLOAD_REGION: auto
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: minio
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: miniosecret
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: http://minio:9000
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
LANGFUSE_S3_EVENT_UPLOAD_PREFIX: events/

langfuse-web:
image: docker.io/langfuse/langfuse:3
restart: always
depends_on:
- langfuse_postgres
- clickhouse
- minio
- redis
ports:
- "3000:3000"
environment:
<<: *langfuse_env
NEXTAUTH_SECRET: mysecret

clickhouse:
image: docker.io/clickhouse/clickhouse-server
restart: always
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: clickhouse
volumes:
- langfuse_clickhouse_data:/var/lib/clickhouse
- langfuse_clickhouse_logs:/var/log/clickhouse-server

minio:
image: docker.io/minio/minio
restart: always
entrypoint: sh
command: -c 'mkdir -p /data/langfuse && minio server --address ":9000" --console-address ":9001" /data'
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: miniosecret
volumes:
- langfuse_minio_data:/data

redis:
image: docker.io/redis:7
restart: always
command: >

pgvector_postgres:
image: "${PLATFORM}pgvector/pgvector:pg16"
ports:
- 5433:5432
restart: always
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=ChangeMe
volumes:
- pgvector-postgres-vl:/var/lib/postgresql/data
- ./scripts/pgvector/init.sql:/docker-entrypoint-initdb.d/init.sql

langfuse_postgres:
image: "${PLATFORM}pgvector/pgvector:pg16"
ports:
- 5439:5432
restart: always
environment:
- POSTGRES_DB=langfuse
- POSTGRES_USER=langfuse
- POSTGRES_PASSWORD=ChangeMe
volumes:
- langfuse-postgres-vl:/var/lib/postgresql/data
- ./scripts/langfuse-init.sql:/docker-entrypoint-initdb.d/init.sql

volumes:
tockmongo:
tockmongo2:
tockmongo3:

pgvector-postgres-vl:
driver: local
langfuse-postgres-vl:
driver: local

langfuse_clickhouse_data:
driver: local
langfuse_clickhouse_logs:
driver: local
langfuse_minio_data:
driver: local