0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 13:39:22 +01:00

chore(dev): Live events locally (#22837)

* chore(dev): Live events locally

* Fix JWT secret var

* Also add Postgres URL

* Update UI snapshots for `chromium` (2)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Michael Matloka 2024-06-10 21:13:30 +02:00 committed by GitHub
parent 9a2f08e50e
commit edd76ca31b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 33 additions and 2 deletions

View File

@ -115,6 +115,13 @@ services:
CLICKHOUSE_SECURE: 'false'
CLICKHOUSE_VERIFY: 'false'
livestream:
image: 'ghcr.io/posthog/livestream:main'
restart: on-failure
depends_on:
kafka:
condition: service_started
migrate:
<<: *worker
command: sh -c "

View File

@ -117,6 +117,17 @@ services:
- redis
- kafka
livestream:
extends:
file: docker-compose.base.yml
service: livestream
environment:
- JWT.TOKEN=${SECRET_KEY}
ports:
- '8666:8080'
volumes:
- ./docker/livestream/configs-dev.yml:/configs/configs.yml
# Temporal containers
elasticsearch:
extends:

View File

@ -0,0 +1,14 @@
prod: false
tailscale:
controlUrl:
hostname: 'live-events-dev'
kafka:
brokers: 'kafka:9092'
topic: 'events_plugin_ingestion'
group_id: 'livestream-dev'
mmdb:
path: 'GeoLite2-City.mmdb'
jwt:
token: '<randomly generated secret key>'
postgres:
url: 'postgres://posthog:posthog@db:5432/posthog'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 131 KiB

View File

@ -15,6 +15,5 @@ export function liveEventsHostOrigin(): string | null {
} else if (appOrigin === 'https://eu.posthog.com') {
return 'https://live.eu.posthog.com'
}
// TODO(@zach): add dev and local env support
return null
return 'http://localhost:8666'
}