2022-05-26 11:36:44 +02:00
|
|
|
#
|
|
|
|
# `docker-compose` file used ONLY for hobby deployments.
|
|
|
|
#
|
|
|
|
# Please take a look at https://posthog.com/docs/self-host/deploy/hobby
|
|
|
|
# for more info.
|
|
|
|
#
|
2023-07-25 16:02:28 +02:00
|
|
|
# PostHog has sunset support for self-hosted K8s deployments.
|
2023-07-24 19:44:44 +02:00
|
|
|
# See: https://posthog.com/blog/sunsetting-helm-support-posthog
|
|
|
|
#
|
2021-11-23 12:25:31 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
db:
|
2022-11-29 21:50:42 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: db
|
2023-09-13 16:11:07 +02:00
|
|
|
# Pin to postgres 12 until we have a process for pg_upgrade to postgres 15 for exsisting installations
|
|
|
|
image: ${DOCKER_REGISTRY_PREFIX:-}postgres:12-alpine
|
2022-08-12 16:31:24 +02:00
|
|
|
volumes:
|
|
|
|
- postgres-data:/var/lib/postgresql/data
|
2023-09-13 16:11:07 +02:00
|
|
|
|
2021-11-23 12:25:31 +01:00
|
|
|
redis:
|
2022-11-29 21:50:42 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: redis
|
2024-05-31 15:12:43 +02:00
|
|
|
volumes:
|
2024-06-04 13:33:42 +02:00
|
|
|
- redis-data:/data
|
2024-09-03 10:09:44 +02:00
|
|
|
|
|
|
|
redis7:
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: redis7
|
|
|
|
volumes:
|
|
|
|
- redis7-data:/data
|
|
|
|
|
2021-11-23 12:25:31 +01:00
|
|
|
clickhouse:
|
2022-03-15 12:19:21 +01:00
|
|
|
#
|
|
|
|
# Note: please keep the default version in sync across
|
|
|
|
# `posthog` and the `charts-clickhouse` repos
|
|
|
|
#
|
2022-11-29 21:50:42 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: clickhouse
|
2021-11-23 12:25:31 +01:00
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
|
|
|
- kafka
|
|
|
|
- zookeeper
|
|
|
|
volumes:
|
2022-06-22 23:24:03 +02:00
|
|
|
- ./posthog/posthog/idl:/idl
|
2021-11-23 12:25:31 +01:00
|
|
|
- ./posthog/docker/clickhouse/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
|
|
|
- ./posthog/docker/clickhouse/config.xml:/etc/clickhouse-server/config.xml
|
|
|
|
- ./posthog/docker/clickhouse/users.xml:/etc/clickhouse-server/users.xml
|
2022-08-12 16:31:24 +02:00
|
|
|
- clickhouse-data:/var/lib/clickhouse
|
2021-11-23 12:25:31 +01:00
|
|
|
zookeeper:
|
2022-11-29 21:50:42 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: zookeeper
|
2022-05-16 19:10:36 +02:00
|
|
|
volumes:
|
|
|
|
- zookeeper-datalog:/datalog
|
|
|
|
- zookeeper-data:/data
|
|
|
|
- zookeeper-logs:/logs
|
2021-11-23 12:25:31 +01:00
|
|
|
kafka:
|
2022-11-29 21:50:42 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: kafka
|
2024-03-13 17:38:46 +01:00
|
|
|
depends_on:
|
|
|
|
- zookeeper
|
2024-06-04 12:09:45 +02:00
|
|
|
environment:
|
|
|
|
KAFKA_LOG_RETENTION_MS: 3600000
|
|
|
|
KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 300000
|
2024-06-05 11:31:47 +02:00
|
|
|
KAFKA_LOG_RETENTION_HOURS: 1
|
2024-05-31 15:12:43 +02:00
|
|
|
volumes:
|
2024-06-04 13:33:42 +02:00
|
|
|
- kafka-data:/bitnami/kafka
|
2022-03-21 12:49:43 +01:00
|
|
|
|
2022-11-30 18:49:17 +01:00
|
|
|
worker:
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: worker
|
2021-11-23 12:25:31 +01:00
|
|
|
environment:
|
2022-01-25 07:14:50 +01:00
|
|
|
SENTRY_DSN: $SENTRY_DSN
|
|
|
|
SITE_URL: https://$DOMAIN
|
2022-12-01 19:22:01 +01:00
|
|
|
SECRET_KEY: $POSTHOG_SECRET
|
2024-08-19 10:15:51 +02:00
|
|
|
OBJECT_STORAGE_ACCESS_KEY_ID: 'object_storage_root_user'
|
|
|
|
OBJECT_STORAGE_SECRET_ACCESS_KEY: 'object_storage_root_password'
|
|
|
|
OBJECT_STORAGE_ENDPOINT: http://objectstorage:19000
|
|
|
|
OBJECT_STORAGE_ENABLED: true
|
2024-10-09 17:16:17 +02:00
|
|
|
ENCRYPTION_SALT_KEYS: $ENCRYPTION_SALT_KEYS
|
2023-11-30 00:16:15 +01:00
|
|
|
image: $REGISTRY_URL:$POSTHOG_APP_TAG
|
2021-11-23 12:25:31 +01:00
|
|
|
web:
|
2022-11-30 18:49:17 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: web
|
2023-03-20 23:56:14 +01:00
|
|
|
command: /compose/start
|
2021-11-23 12:25:31 +01:00
|
|
|
volumes:
|
|
|
|
- ./compose:/compose
|
2023-11-30 00:16:15 +01:00
|
|
|
image: $REGISTRY_URL:$POSTHOG_APP_TAG
|
2022-11-30 18:49:17 +01:00
|
|
|
environment:
|
|
|
|
SENTRY_DSN: $SENTRY_DSN
|
|
|
|
SITE_URL: https://$DOMAIN
|
2022-12-01 19:22:01 +01:00
|
|
|
SECRET_KEY: $POSTHOG_SECRET
|
2024-08-19 10:15:51 +02:00
|
|
|
OBJECT_STORAGE_ACCESS_KEY_ID: 'object_storage_root_user'
|
|
|
|
OBJECT_STORAGE_SECRET_ACCESS_KEY: 'object_storage_root_password'
|
2024-05-13 11:03:07 +02:00
|
|
|
OBJECT_STORAGE_ENDPOINT: http://objectstorage:19000
|
|
|
|
OBJECT_STORAGE_ENABLED: true
|
2024-10-09 17:16:17 +02:00
|
|
|
ENCRYPTION_SALT_KEYS: $ENCRYPTION_SALT_KEYS
|
2024-03-13 17:38:46 +01:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
- clickhouse
|
|
|
|
- kafka
|
2024-05-09 11:44:03 +02:00
|
|
|
- objectstorage
|
2024-02-26 09:43:27 +01:00
|
|
|
|
2022-11-30 18:49:17 +01:00
|
|
|
plugins:
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: plugins
|
2023-11-30 00:16:15 +01:00
|
|
|
image: $REGISTRY_URL:$POSTHOG_APP_TAG
|
2022-11-30 18:49:17 +01:00
|
|
|
environment:
|
|
|
|
SENTRY_DSN: $SENTRY_DSN
|
|
|
|
SITE_URL: https://$DOMAIN
|
2022-12-01 19:22:01 +01:00
|
|
|
SECRET_KEY: $POSTHOG_SECRET
|
2024-08-19 10:15:51 +02:00
|
|
|
OBJECT_STORAGE_ACCESS_KEY_ID: 'object_storage_root_user'
|
|
|
|
OBJECT_STORAGE_SECRET_ACCESS_KEY: 'object_storage_root_password'
|
|
|
|
OBJECT_STORAGE_ENDPOINT: http://objectstorage:19000
|
|
|
|
OBJECT_STORAGE_ENABLED: true
|
2024-09-03 10:09:44 +02:00
|
|
|
CDP_REDIS_HOST: redis7
|
2024-09-04 17:37:01 +02:00
|
|
|
CDP_REDIS_PORT: 6379
|
2024-10-09 17:16:17 +02:00
|
|
|
ENCRYPTION_SALT_KEYS: $ENCRYPTION_SALT_KEYS
|
2024-03-13 17:38:46 +01:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
2024-09-03 10:09:44 +02:00
|
|
|
- redis7
|
2024-03-13 17:38:46 +01:00
|
|
|
- clickhouse
|
|
|
|
- kafka
|
2024-05-09 11:44:03 +02:00
|
|
|
- objectstorage
|
2022-11-30 18:49:17 +01:00
|
|
|
|
2021-11-23 12:25:31 +01:00
|
|
|
caddy:
|
2022-09-22 23:51:57 +02:00
|
|
|
image: caddy:2.6.1
|
2021-11-23 12:25:31 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- '80:80'
|
|
|
|
- '443:443'
|
|
|
|
volumes:
|
|
|
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
2024-05-21 16:22:09 +02:00
|
|
|
- caddy-data:/data
|
2024-05-21 21:01:15 +02:00
|
|
|
- caddy-config:/config
|
2021-11-23 12:25:31 +01:00
|
|
|
depends_on:
|
|
|
|
- web
|
2024-05-09 11:44:03 +02:00
|
|
|
objectstorage:
|
2022-11-29 21:50:42 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
2024-05-09 11:44:03 +02:00
|
|
|
service: objectstorage
|
2022-05-26 11:36:44 +02:00
|
|
|
restart: on-failure
|
2022-05-20 10:56:50 +02:00
|
|
|
volumes:
|
2024-05-09 11:44:03 +02:00
|
|
|
- objectstorage:/data
|
2024-05-13 11:03:07 +02:00
|
|
|
ports:
|
|
|
|
- '19000:19000'
|
|
|
|
- '19001:19001'
|
2022-05-20 10:56:50 +02:00
|
|
|
|
2022-03-09 14:42:15 +01:00
|
|
|
asyncmigrationscheck:
|
2022-11-30 18:49:17 +01:00
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: asyncmigrationscheck
|
2023-11-30 00:16:15 +01:00
|
|
|
image: $REGISTRY_URL:$POSTHOG_APP_TAG
|
2022-11-30 18:49:17 +01:00
|
|
|
environment:
|
|
|
|
SENTRY_DSN: $SENTRY_DSN
|
|
|
|
SITE_URL: https://$DOMAIN
|
2022-12-01 19:22:01 +01:00
|
|
|
SECRET_KEY: $POSTHOG_SECRET
|
2023-06-07 16:56:56 +02:00
|
|
|
SKIP_ASYNC_MIGRATIONS_SETUP: 0
|
2022-05-16 19:10:36 +02:00
|
|
|
|
2023-03-20 23:56:14 +01:00
|
|
|
# Temporal containers
|
|
|
|
temporal:
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: temporal
|
|
|
|
environment:
|
|
|
|
- ENABLE_ES=false
|
|
|
|
ports:
|
|
|
|
- 7233:7233
|
2023-05-09 15:24:13 +02:00
|
|
|
volumes:
|
|
|
|
- ./posthog/docker/temporal/dynamicconfig:/etc/temporal/config/dynamicconfig
|
2024-04-24 21:10:01 +02:00
|
|
|
elasticsearch:
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
2024-04-25 11:41:33 +02:00
|
|
|
service: elasticsearch
|
2023-03-20 23:56:14 +01:00
|
|
|
temporal-admin-tools:
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: temporal-admin-tools
|
2024-03-13 17:38:46 +01:00
|
|
|
depends_on:
|
|
|
|
- temporal
|
2023-03-20 23:56:14 +01:00
|
|
|
temporal-ui:
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: temporal-ui
|
|
|
|
ports:
|
|
|
|
- 8081:8080
|
2024-03-13 17:38:46 +01:00
|
|
|
depends_on:
|
|
|
|
temporal:
|
|
|
|
condition: service_started
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
2023-03-20 23:56:14 +01:00
|
|
|
temporal-django-worker:
|
|
|
|
command: /compose/temporal-django-worker
|
|
|
|
extends:
|
|
|
|
file: docker-compose.base.yml
|
|
|
|
service: temporal-django-worker
|
|
|
|
volumes:
|
|
|
|
- ./compose:/compose
|
2023-11-30 00:16:15 +01:00
|
|
|
image: $REGISTRY_URL:$POSTHOG_APP_TAG
|
2023-03-20 23:56:14 +01:00
|
|
|
environment:
|
|
|
|
SENTRY_DSN: $SENTRY_DSN
|
|
|
|
SITE_URL: https://$DOMAIN
|
2024-08-01 11:03:12 +02:00
|
|
|
SECRET_KEY: $POSTHOG_SECRET
|
2024-03-13 17:38:46 +01:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
- clickhouse
|
|
|
|
- kafka
|
2024-05-09 11:44:03 +02:00
|
|
|
- objectstorage
|
2024-03-13 17:38:46 +01:00
|
|
|
- temporal
|
2023-03-20 23:56:14 +01:00
|
|
|
|
2022-05-16 19:10:36 +02:00
|
|
|
volumes:
|
|
|
|
zookeeper-data:
|
|
|
|
zookeeper-datalog:
|
|
|
|
zookeeper-logs:
|
2024-05-09 11:44:03 +02:00
|
|
|
objectstorage:
|
2022-08-12 16:31:24 +02:00
|
|
|
postgres-data:
|
|
|
|
clickhouse-data:
|
2024-05-21 16:22:09 +02:00
|
|
|
caddy-data:
|
|
|
|
caddy-config:
|
2024-05-31 15:12:43 +02:00
|
|
|
redis-data:
|
2024-09-03 10:09:44 +02:00
|
|
|
redis7-data:
|
2024-05-31 15:12:43 +02:00
|
|
|
kafka-data:
|