mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-27 16:26:50 +01:00
90 lines
2.6 KiB
YAML
90 lines
2.6 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
zookeeper:
|
|
image: zookeeper:3.7.0
|
|
restart: on-failure
|
|
|
|
kafka:
|
|
image: ghcr.io/posthog/kafka-container:v2.8.2
|
|
restart: on-failure
|
|
depends_on:
|
|
- zookeeper
|
|
environment:
|
|
KAFKA_BROKER_ID: 1001
|
|
KAFKA_CFG_RESERVED_BROKER_MAX_ID: 1001
|
|
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
|
|
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
|
|
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
|
|
ALLOW_PLAINTEXT_LISTENER: 'true'
|
|
ports:
|
|
- '9092:9092'
|
|
healthcheck:
|
|
test: kafka-cluster.sh cluster-id --bootstrap-server localhost:9092 || exit 1
|
|
interval: 3s
|
|
timeout: 10s
|
|
retries: 10
|
|
|
|
redis:
|
|
image: redis:6.2.7-alpine
|
|
restart: on-failure
|
|
command: redis-server --maxmemory-policy allkeys-lru --maxmemory 200mb
|
|
ports:
|
|
- '6379:6379'
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 3s
|
|
timeout: 10s
|
|
retries: 10
|
|
|
|
kafka-ui:
|
|
image: provectuslabs/kafka-ui:latest
|
|
profiles: ['ui']
|
|
ports:
|
|
- '8080:8080'
|
|
depends_on:
|
|
- zookeeper
|
|
- kafka
|
|
environment:
|
|
KAFKA_CLUSTERS_0_NAME: local
|
|
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
|
|
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
|
|
|
|
db:
|
|
container_name: db
|
|
image: docker.io/library/postgres:16-alpine
|
|
restart: on-failure
|
|
environment:
|
|
POSTGRES_USER: posthog
|
|
POSTGRES_DB: posthog
|
|
POSTGRES_PASSWORD: posthog
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U posthog']
|
|
interval: 5s
|
|
timeout: 5s
|
|
ports:
|
|
- '15432:5432'
|
|
command: postgres -c max_connections=1000 -c idle_in_transaction_session_timeout=300000
|
|
|
|
setup_test_db:
|
|
container_name: setup-test-db
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.migrate-hooks
|
|
restart: on-failure
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: true
|
|
environment:
|
|
DATABASE_URL: postgres://posthog:posthog@db:5432/test_database
|
|
|
|
echo_server:
|
|
image: docker.io/library/caddy:2
|
|
container_name: echo-server
|
|
restart: on-failure
|
|
ports:
|
|
- '18081:8081'
|
|
volumes:
|
|
- ./docker/echo-server/Caddyfile:/etc/caddy/Caddyfile
|