2020-09-09 01:12:27 +02:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
db:
|
2021-04-03 20:41:47 +02:00
|
|
|
image: postgres:12-alpine
|
2020-09-09 01:12:27 +02:00
|
|
|
environment:
|
|
|
|
POSTGRES_USER: posthog
|
|
|
|
POSTGRES_DB: posthog
|
|
|
|
POSTGRES_PASSWORD: posthog
|
|
|
|
ports:
|
2021-07-14 17:14:27 +02:00
|
|
|
- '5432:5432'
|
2020-09-09 01:12:27 +02:00
|
|
|
redis:
|
|
|
|
image: 'redis:alpine'
|
|
|
|
ports:
|
|
|
|
- '6379:6379'
|
2021-04-03 20:41:47 +02:00
|
|
|
clickhouse:
|
2021-08-17 21:54:47 +02:00
|
|
|
# KEEP CLICKHOUSE-SERVER VERSION IN SYNC WITH
|
|
|
|
# https://github.com/PostHog/charts-clickhouse/blob/main/charts/posthog/templates/clickhouse_instance.yaml#L88
|
|
|
|
image: yandex/clickhouse-server:21.6.5
|
2021-04-03 20:41:47 +02:00
|
|
|
depends_on:
|
|
|
|
- kafka
|
2021-07-16 02:20:37 +02:00
|
|
|
- zookeeper
|
2021-04-03 20:41:47 +02:00
|
|
|
ports:
|
|
|
|
- '8123:8123'
|
|
|
|
- '9000:9000'
|
|
|
|
- '9440:9440'
|
|
|
|
- '9009:9009'
|
2020-09-09 01:12:27 +02:00
|
|
|
volumes:
|
2021-04-03 20:41:47 +02:00
|
|
|
- ./idl:/idl
|
|
|
|
- ../docker/clickhouse/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
|
|
|
- ../docker/clickhouse/config.xml:/etc/clickhouse-server/config.xml
|
2021-08-25 03:47:15 +02:00
|
|
|
- ../docker/clickhouse/users.xml:/etc/clickhouse-server/users.xml
|
2021-04-03 20:41:47 +02:00
|
|
|
zookeeper:
|
|
|
|
image: wurstmeister/zookeeper
|
|
|
|
kafka:
|
|
|
|
image: wurstmeister/kafka
|
|
|
|
depends_on:
|
|
|
|
- zookeeper
|
2020-09-09 01:12:27 +02:00
|
|
|
ports:
|
2021-04-03 20:41:47 +02:00
|
|
|
- '9092:9092'
|
2020-09-09 01:12:27 +02:00
|
|
|
environment:
|
2021-04-03 20:41:47 +02:00
|
|
|
KAFKA_ADVERTISED_HOST_NAME: kafka
|
|
|
|
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
|
|
|
worker: &worker
|
2020-09-09 01:12:27 +02:00
|
|
|
build:
|
|
|
|
context: ../
|
|
|
|
dockerfile: dev.Dockerfile
|
2020-12-17 01:35:19 +01:00
|
|
|
command: ./bin/docker-worker-celery --with-scheduler
|
2020-09-09 01:12:27 +02:00
|
|
|
volumes:
|
|
|
|
- ..:/code
|
|
|
|
environment:
|
2021-10-27 14:54:48 +02:00
|
|
|
DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'
|
2020-09-09 01:12:27 +02:00
|
|
|
CLICKHOUSE_HOST: 'clickhouse'
|
|
|
|
CLICKHOUSE_DATABASE: 'posthog'
|
2021-01-07 16:21:16 +01:00
|
|
|
CLICKHOUSE_SECURE: 'false'
|
|
|
|
CLICKHOUSE_VERIFY: 'false'
|
2020-09-17 20:09:41 +02:00
|
|
|
KAFKA_URL: 'kafka://kafka'
|
2020-09-09 01:12:27 +02:00
|
|
|
REDIS_URL: 'redis://redis:6379/'
|
2021-02-04 16:17:24 +01:00
|
|
|
SECRET_KEY: 'alsdfjiosdajfklalsdjkf'
|
2020-09-09 01:12:27 +02:00
|
|
|
DEBUG: 'true'
|
|
|
|
PRIMARY_DB: 'clickhouse'
|
2021-04-03 20:41:47 +02:00
|
|
|
PGHOST: db
|
|
|
|
PGUSER: posthog
|
|
|
|
PGPASSWORD: posthog
|
2020-09-09 01:12:27 +02:00
|
|
|
depends_on:
|
2021-10-27 14:54:48 +02:00
|
|
|
- db
|
2020-09-09 01:12:27 +02:00
|
|
|
- redis
|
2021-04-03 20:41:47 +02:00
|
|
|
- clickhouse
|
|
|
|
- kafka
|
2021-10-27 14:54:48 +02:00
|
|
|
links:
|
|
|
|
- db:db
|
|
|
|
- redis:redis
|
|
|
|
- clickhouse:clickhouse
|
|
|
|
- kafka:kafka
|
2021-04-03 20:41:47 +02:00
|
|
|
web:
|
|
|
|
<<: *worker
|
2021-06-29 08:02:13 +02:00
|
|
|
command: '${CH_WEB_SCRIPT:-./ee/bin/docker-ch-dev-web}'
|
2021-04-03 20:41:47 +02:00
|
|
|
ports:
|
|
|
|
- '8000:8000'
|
|
|
|
- '8234:8234'
|
2020-12-17 01:35:19 +01:00
|
|
|
plugins:
|
2021-10-05 11:20:43 +02:00
|
|
|
build:
|
|
|
|
context: ../
|
|
|
|
dockerfile: dev.Dockerfile
|
|
|
|
command: ./bin/plugin-server --no-restart-loop
|
|
|
|
volumes:
|
|
|
|
- ..:/code
|
2021-01-21 15:39:44 +01:00
|
|
|
restart: on-failure
|
2020-12-17 01:35:19 +01:00
|
|
|
environment:
|
2021-10-27 14:54:48 +02:00
|
|
|
DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'
|
2021-01-07 16:21:16 +01:00
|
|
|
KAFKA_ENABLED: 'true'
|
|
|
|
KAFKA_HOSTS: 'kafka:9092'
|
2020-12-17 01:35:19 +01:00
|
|
|
REDIS_URL: 'redis://redis:6379/'
|
2021-03-02 11:57:19 +01:00
|
|
|
CLICKHOUSE_HOST: 'clickhouse'
|
2020-12-17 01:35:19 +01:00
|
|
|
depends_on:
|
2021-10-27 14:54:48 +02:00
|
|
|
- db
|
2020-12-17 01:35:19 +01:00
|
|
|
- redis
|
2021-01-21 15:39:44 +01:00
|
|
|
- clickhouse
|
|
|
|
- kafka
|
2021-10-27 14:54:48 +02:00
|
|
|
links:
|
|
|
|
- db:db
|
|
|
|
- redis:redis
|
|
|
|
- clickhouse:clickhouse
|
|
|
|
- kafka:kafka
|