Skip to content

Commit

Permalink
posthog for learn-ai
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertrand committed Feb 28, 2025
1 parent 6acad67 commit ec992aa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ config:
MITOL_COOKIE_NAME: "mitol"
MITOL_FEATURES_DEFAULT: "true"
NODE_ENV: "development"
POSTHOG_API_HOST: "https://app.posthog.com"
POSTHOG_ENABLED: "true"
POSTHOG_PROJECT_ID: "63497"
POSTHOG_TIMEOUT_MS: 1000
POSTHOG_ENABLE_SESSION_RECORDING: "false"
UWSGI_THREADS: "5"
learn_ai:frontend_domain: "learn-ai.ol.mit.edu"
redis:password:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ config:
MITOL_COOKIE_NAME: "mitol"
MITOL_FEATURES_DEFAULT: "true"
NODE_ENV: "development"
POSTHOG_API_HOST: "https://app.posthog.com"
POSTHOG_ENABLED: "true"
POSTHOG_PROJECT_ID: "86325"
POSTHOG_TIMEOUT_MS: 1000
POSTHOG_ENABLE_SESSION_RECORDING: "true"
UWSGI_THREADS: "5"
learn_ai:frontend_domain: "learn-ai-qa.ol.mit.edu"
redis:password:
Expand Down
15 changes: 15 additions & 0 deletions src/ol_infrastructure/applications/learn_ai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1304,3 +1304,18 @@
value=f"https://{learn_ai_config.require('backend_domain')}",
opts=ResourceOptions(provider=github_provider, delete_before_replace=True),
)

gh_workflow_posthog_project_api_key_env_secret = github.ActionsSecret(
f"learn-ai-gh-workflow-posthog-project-api_key-{stack_info.env_suffix}",
repository=gh_repo.name,
secret_name=f"POSTHOG_PROJECT_API_KEY_{env_var_suffix}",
plaintext_value=read_yaml_secrets(Path("posthog.yaml"))["project_api_key"],
opts=ResourceOptions(provider=github_provider, delete_before_replace=True),
)
gh_workflow_posthog_personal_api_key_env_secret = github.ActionsSecret(
f"learn-ai-gh-workflow-posthog-personal-api-key-{stack_info.env_suffix}",
repository=gh_repo.name,
secret_name=f"POSTHOG_PERSONAL_API_KEY_{env_var_suffix}",
plaintext_value=read_yaml_secrets(Path("posthog.yaml"))["personal_api_key"],
opts=ResourceOptions(provider=github_provider, delete_before_replace=True),
)

0 comments on commit ec992aa

Please sign in to comment.