Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Open-source hobby deploy fails, fix PostHog/posthog#16169 #19613

Closed
wants to merge 1 commit into from

Conversation

jk2K
Copy link

@jk2K jk2K commented Jan 5, 2024

fix #16169

docker compose config

expected

...
temporal-django-worker:
    command:
      - /compose/temporal-django-worker
    depends_on:
      clickhouse:
        condition: service_started
        required: true
      db:
        condition: service_started
        required: true
      kafka:
        condition: service_started
        required: true
      object_storage:
        condition: service_started
        required: true
      redis:
        condition: service_started
        required: true
      temporal:
        condition: service_started
        required: true
    environment:
      CLICKHOUSE_DATABASE: posthog
      CLICKHOUSE_HOST: clickhouse
      CLICKHOUSE_SECURE: "false"
      CLICKHOUSE_VERIFY: "false"
      DATABASE_URL: postgres://posthog:posthog@db:5432/posthog
      DEPLOYMENT: hobby
      DISABLE_SECURE_SSL_REDIRECT: "true"
      IS_BEHIND_PROXY: "true"
      KAFKA_HOSTS: kafka
      PGHOST: db
      PGPASSWORD: posthog
      PGUSER: posthog
      REDIS_URL: redis://redis:6379/
      SECRET_KEY: 29cfc82ae530dbcefac584f117ab347ea39acb7614dc82c28523b548
      SENTRY_DSN: ""
      SITE_URL: https://posthog-demo.dev
      TEMPORAL_HOST: temporal
    image: posthog/posthog:latest
...

@benjackwhite benjackwhite requested review from a team and fuziontech January 5, 2024 08:14
Copy link

@davemurphysf davemurphysf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

Comment on lines -200 to -201
environment:
TEMPORAL_HOST: temporal
Copy link
Contributor

@tomasfarias tomasfarias Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this here as it may be used somewhere else. Hobby docker compose should be overwriting this entire block anyways, so keeping it won't hurt there.

Comment on lines 146 to +148
SENTRY_DSN: $SENTRY_DSN
SITE_URL: https://$DOMAIN
TEMPORAL_HOST: temporal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading through the issue, we may need SECRET_KEY: $POSTHOG_SECRET here too. Have you been able to verify this @jk2K? If not, I can run a test of the hobby stack later today and decide.

Copy link
Author

@jk2K jk2K Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, got error.

ValueError: Duplicated timeseries in CollectorRegistry: {'posthog_celery_task_pre_run_created', 'posthog_celery_task_pre_run_total', 'posthog_celery_task_pre_run'}

@posthog-bot posthog-bot removed the stale label Jan 16, 2024
@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Contributor

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

@posthog-bot posthog-bot closed this Feb 1, 2024
@ephemer
Copy link

ephemer commented Feb 29, 2024

@tomasfarias thanks for updating the hobby deployment

your suggestion of adding SECRET_KEY: $POSTHOG_SECRET is important, as is adding – at the very least

DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'

I also added:

KAFKA_HOSTS: 'kafka:9092'
REDIS_URL: 'redis://redis:6379/'
CLICKHOUSE_HOST: 'clickhouse'
CLICKHOUSE_DATABASE: 'posthog'
CLICKHOUSE_SECURE: 'false'
CLICKHOUSE_VERIFY: 'false'

but I'm not certain they are required. Based on experience trying to fix some other issues when upgrading the hobby deployment to latest probably at least REDIS_URL will be required, but I didn't yet test that.

Would be really valuable to get these in – currently hobby deployments don't seem to run correctly without this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open-source hobby deploy fails on ubuntu 22
5 participants