-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathdocker-compose.yml
89 lines (82 loc) · 2.56 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
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