Files
insights/compose.dev.yml
zeekay 168c1136b4 Ship the funnel UDF config in the image
The funnel queries call the unversioned UDFs (aggregate_funnel_array and
kin), declared only in docker/datastore/user_defined_function.xml, which
no image carries. The binaries already ship in insights/user_scripts, so
the config moves beside them: a datastore takes both from one image.
2026-09-30 07:34:07 -07:00

306 lines
8.4 KiB
YAML

#
# docker-compose file used ONLY for local development.
# For more info, see:
# https://insights.hanzo.ai/handbook/engineering/developing-locally
#
# Insights has sunset support for self-hosted K8s deployments.
# See: https://insights.hanzo.ai/blog/sunsetting-helm-support-insights
#
services:
proxy:
extends:
file: docker-compose.base.yml
service: proxy
ports:
- 127.0.0.1:8010:8000
extra_hosts:
- 'web:host-gateway'
- 'plugins:host-gateway'
- 'capture:host-gateway'
- 'capture-ai:host-gateway'
- 'replay-capture:host-gateway'
- 'feature-flags:host-gateway'
environment:
CADDYFILE: |
http://localhost:8000 {
@replay-capture {
path /s
path /s/*
}
@capture-ai {
path /i/v0/ai
path /i/v0/ai/*
}
@capture {
path /e
path /e/*
path /i/v0/*
path /batch
path /batch*
path /capture
path /capture*
}
@capture-logs {
path /i/v1/logs
}
@flags {
path /flags
path /flags*
}
@webhooks {
path /public/webhooks
path /public/webhooks/*
path /public/m
path /public/m/*
}
handle @capture-ai {
reverse_proxy capture-ai:3309
}
handle @capture {
reverse_proxy capture:3307
}
handle @capture-logs {
reverse_proxy capture-logs:4318
}
handle @replay-capture {
reverse_proxy replay-capture:3306
}
handle @flags {
reverse_proxy feature-flags:3001
}
handle @webhooks {
reverse_proxy plugins:6738
}
handle {
reverse_proxy web:8000
}
}
db:
extends:
file: docker-compose.base.yml
service: db
ports:
- '5432:5432'
volumes:
- postgres-15-data:/var/lib/postgresql/data
# something in the django app when running in dev mode
# (maybe only in Pycharm) keeps many idle transactions open
# and eventually kills postgres, these settings aim to stop that happening.
# They are only for DEV and should not be used in production.
command: postgres -c max_connections=1000 -c idle_in_transaction_session_timeout=300000 -c max_prepared_transactions=10
kv:
extends:
file: docker-compose.base.yml
service: kv
ports:
- '6379:6379'
flower:
extends:
file: docker-compose.base.yml
service: flower
ports:
- '5555:5555'
datastore:
extends:
file: docker-compose.base.yml
service: datastore
hostname: datastore
# Development performance optimizations
mem_limit: 8g
cpus: 2
environment:
- AWS_ACCESS_KEY_ID=object_storage_root_user
- AWS_SECRET_ACCESS_KEY=object_storage_root_password
- DATASTORE_SKIP_USER_SETUP=1
ports:
- '8123:8123'
- '8443:8443'
- '9000:9000'
- '9440:9440'
- '9009:9009'
volumes:
- ./insights/idl:/idl
- ./docker/datastore/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./docker/datastore/config.xml:/etc/datastore-server/config.xml
- ./docker/datastore/config.d/default.xml:/etc/datastore-server/config.d/default.xml
- ./docker/datastore/config.d/dev-memory.xml:/etc/datastore-server/config.d/dev-memory.xml
- ./docker/datastore/users-dev.xml:/etc/datastore-server/users.xml
- ./insights/user_scripts/user_defined_function.xml:/etc/datastore-server/user_defined_function.xml
- ./insights/user_scripts:/var/lib/datastore/user_scripts
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- kafka
kafka:
extends:
file: docker-compose.base.yml
service: kafka
ports:
- '9092:9092'
kafka_ui:
extends:
file: docker-compose.base.yml
service: kafka_ui
ports:
- '9093:8080'
environment:
SERVER_MAX_HTTP_REQUEST_HEADER_SIZE: 65536
depends_on:
- kafka
objectstorage:
extends:
file: docker-compose.base.yml
service: objectstorage
ports:
- '19000:19000'
- '19001:19001'
objectstorage-azure:
extends:
file: docker-compose.base.yml
service: objectstorage-azure
maildev:
extends:
file: docker-compose.base.yml
service: maildev
ports:
- '1080:1080'
- '1025:1025'
webhook-tester:
image: tarampampam/webhook-tester:1.1.0
restart: on-failure
ports:
- '2080:2080'
environment:
- LISTEN_PORT=2080
echo_server:
extends:
file: docker-compose.base.yml
service: echo_server
feature-flags:
extends:
file: docker-compose.base.yml
service: feature-flags
depends_on:
kv:
condition: service_healthy
db:
condition: service_healthy
environment:
# Mode 2: Dual-write warming phase for developers
FLAGS_REDIS_URL: 'redis://kv:6379/1'
FLAGS_REDIS_ENABLED: 'false' # Warming but not reading yet
REDIS_COMPRESSION_ENABLED: 'true'
# Temporal containers
elasticsearch:
extends:
file: docker-compose.base.yml
service: elasticsearch
expose:
- 9200
temporal:
extends:
file: docker-compose.base.yml
service: temporal
temporal-admin-tools:
extends:
file: docker-compose.base.yml
service: temporal-admin-tools
depends_on:
- temporal
temporal-ui:
extends:
file: docker-compose.base.yml
service: temporal-ui
depends_on:
temporal:
condition: service_started
db:
condition: service_healthy
otel-collector:
extends:
file: docker-compose.base.yml
service: otel-collector
depends_on:
- jaeger
- capture-logs
capture-logs:
extends:
file: docker-compose.base.yml
service: capture-logs
depends_on:
- kafka
jaeger:
extends:
file: docker-compose.base.yml
service: jaeger
localstack:
extends:
file: docker-compose.base.yml
service: localstack
seaweedfs:
extends:
file: docker-compose.base.yml
service: seaweedfs
command: server -s3 -s3.port=8333 -filer -dir=/data
ports:
- '127.0.0.1:8888:8888' # SeaweedFS Filer UI
volumes:
- 'seaweedfs-data:/data'
etcd:
image: quay.io/coreos/etcd:v3.6.8
restart: on-failure
environment:
ETCD_NAME: etcd0
ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ports:
- '127.0.0.1:2379:2379'
healthcheck:
test: ['CMD', 'etcdctl', 'endpoint', 'health']
interval: 5s
timeout: 5s
retries: 10
networks:
otel_network:
driver: bridge
volumes:
postgres-15-data:
redpanda-data:
seaweedfs-data: