Skip to content

Commit 65885df

Browse files
authored
docs(v1): use posthog instead of segment (#13955)
* docs(v1): use posthog instead of segment * added note to deployment guides * fix tests
1 parent 313d801 commit 65885df

22 files changed

Lines changed: 241 additions & 123 deletions

File tree

.github/workflows/docs-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
env:
4242
NODE_OPTIONS: "--max-old-space-size=8192"
4343
API_URL: "https://docs.medusajs.com"
44+
POSTHOG_API_KEY: "temp"
45+
POSTHOG_HOST: "https://eu.i.posthog.com"
4446
run: yarn build:docs
4547

4648
vale-docs:

www/apps/api-reference/.env.sample

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ NEXT_PUBLIC_API_V2_URL=
1313
ALGOLIA_WRITE_API_KEY=
1414
NEXT_PUBLIC_AI_ASSISTANT_URL=
1515
NEXT_PUBLIC_AI_WEBSITE_ID=
16-
NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY=
16+
NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY=
17+
NEXT_PUBLIC_POSTHOG_API_KEY=
18+
NEXT_PUBLIC_POSTHOG_HOST=

www/apps/api-reference/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"openapi-sampler": "^1.3.1",
3838
"openapi-types": "^12.1.3",
3939
"postcss": "8.4.27",
40+
"posthog-js": "^1.285.1",
4041
"prism-react-renderer": "2.3.1",
4142
"react": "^18.2.0",
4243
"react-dom": "^18.2.0",

www/apps/api-reference/providers/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ type ProvidersProps = {
1818

1919
const Providers = ({ children }: ProvidersProps) => {
2020
return (
21-
<AnalyticsProvider writeKey={process.env.NEXT_PUBLIC_SEGMENT_API_KEY}>
21+
<AnalyticsProvider
22+
posthogApiKey={process.env.NEXT_PUBLIC_POSTHOG_API_KEY}
23+
posthogHost={process.env.NEXT_PUBLIC_POSTHOG_HOST}
24+
>
2225
<PageLoadingProvider>
2326
<ModalProvider>
2427
<ColorModeProvider>

www/apps/docs/.env.sample

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ AI_API_ASSISTANT_TOKEN=
88
AI_WEBSITE_ID=
99
AI_API_ASSISTANT_RECAPTCHA_SITE_KEY=
1010
CLOUDINARY_CLOUD_NAME=
11-
BASE_PATH=
11+
BASE_PATH=
12+
POSTHOG_API_KEY=
13+
POSTHOG_HOST=

www/apps/docs/content/deployments/index.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,22 @@ import { getCategoryItems } from '@site/src/utils/get-first-category-item';
77

88
# Deployment Overview
99

10-
In this document, you’ll learn about the different ways you can deploy your Medusa project.
10+
In this document, you’ll learn about the different ways you can deploy your Medusa v1 project.
11+
12+
<Note title="Deploy with Medusa Cloud">
13+
14+
This guide is intended for Medusa v1 users. If you're a Medusa v2 user, consider using [Medusa Cloud](https://docs.medusajs.com/cloud). By using Medusa Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance.
15+
16+
With Medusa Cloud, you also maintain full customization control as you deploy your own modules and customizations directly from GitHub:
17+
18+
1. Push to deploy.
19+
2. Multiple testing environments.
20+
3. Preview environments for new PRs.
21+
4. Test on production-like data.
22+
23+
Refer to the [Cloud vs. Self-Hosting comparison guide](https://docs.medusajs.com/cloud/comparison) for more details.
24+
25+
</Note>
1126

1227
## Overview
1328

www/apps/docs/content/deployments/server/deploying-on-digital-ocean.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,22 @@ addHowToData: true
55

66
# Deploy Your Medusa Backend to DigitalOcean Apps
77

8-
In this document, you'll learn how to deploy your Medusa backend to a DigitalOcean App.
8+
In this document, you'll learn how to deploy your Medusa v1 backend to a DigitalOcean App.
9+
10+
:::info[Deploy with Medusa Cloud]
11+
12+
This guide is intended for Medusa v1 users. If you're a Medusa v2 user, consider using [Medusa Cloud](https://docs.medusajs.com/cloud). By using Medusa Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance.
13+
14+
With Medusa Cloud, you also maintain full customization control as you deploy your own modules and customizations directly from GitHub:
15+
16+
1. Push to deploy.
17+
2. Multiple testing environments.
18+
3. Preview environments for new PRs.
19+
4. Test on production-like data.
20+
21+
Refer to the [Cloud vs. Self-Hosting comparison guide](https://docs.medusajs.com/cloud/comparison) for more details.
22+
23+
:::
924

1025
DigitalOcean is a reliable hosting provider that provides different ways to host websites and servers. One way to host a backend is using their DigitalOcean App Platform.
1126

www/apps/docs/content/deployments/server/deploying-on-heroku.mdx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,22 @@ addHowToData: true
55

66
# Deploy Your Medusa Backend on Heroku
77

8-
In this document, you'll learn how to deploy your Medusa backend on Heroku. Heroku is a PaaS (Platform as a Service) that allows you to easily deploy your applications in the cloud.
8+
In this document, you'll learn how to deploy your Medusa v1 backend on Heroku. Heroku is a PaaS (Platform as a Service) that allows you to easily deploy your applications in the cloud.
99

10-
Alternatively, you can use this button to deploy the Medusa backend to Heroku directly:
10+
<Note title="Deploy with Medusa Cloud">
1111

12-
<a href="https://heroku.com/deploy?template=https://github.com/medusajs/medusa-starter-default/tree/feat/deploy-heroku" className="img-url">
13-
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy to Heroku" className="no-zoom-img" />
14-
</a>
12+
This guide is intended for Medusa v1 users. If you're a Medusa v2 user, consider using [Medusa Cloud](https://docs.medusajs.com/cloud). By using Medusa Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance.
13+
14+
With Medusa Cloud, you also maintain full customization control as you deploy your own modules and customizations directly from GitHub:
15+
16+
1. Push to deploy.
17+
2. Multiple testing environments.
18+
3. Preview environments for new PRs.
19+
4. Test on production-like data.
20+
21+
Refer to the [Cloud vs. Self-Hosting comparison guide](https://docs.medusajs.com/cloud/comparison) for more details.
22+
23+
</Note>
1524

1625
## Prerequisites
1726

www/apps/docs/content/deployments/server/deploying-on-microtica.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,22 @@ addHowToData: true
55

66
# Deploy Your Medusa Backend on Microtica
77

8-
In this document, you'll learn how to deploy your Medusa backend on your AWS account with Microtica.
8+
In this document, you'll learn how to deploy your Medusa v1 backend on your AWS account with Microtica.
9+
10+
:::info[Deploy with Medusa Cloud]
11+
12+
This guide is intended for Medusa v1 users. If you're a Medusa v2 user, consider using [Medusa Cloud](https://docs.medusajs.com/cloud). By using Medusa Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance.
13+
14+
With Medusa Cloud, you also maintain full customization control as you deploy your own modules and customizations directly from GitHub:
15+
16+
1. Push to deploy.
17+
2. Multiple testing environments.
18+
3. Preview environments for new PRs.
19+
4. Test on production-like data.
20+
21+
Refer to the [Cloud vs. Self-Hosting comparison guide](https://docs.medusajs.com/cloud/comparison) for more details.
22+
23+
:::
924

1025
:::note
1126

www/apps/docs/content/deployments/server/deploying-on-railway.mdx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,26 @@ import MimeErrorTroubleshooting from "../../troubleshooting/mime-error.md"
99

1010
# Deploy Your Medusa Backend to Railway
1111

12-
In this document, you’ll learn how to deploy your Medusa backend to Railway.
12+
In this document, you’ll learn how to deploy your Medusa v1 backend to Railway.
1313

14-
## What is Railway
14+
<Note title="Deploy with Medusa Cloud">
1515

16-
[Railway](https://railway.app/) is a hosting provider that you can use to deploy web applications and databases without having to worry about managing the full infrastructure.
16+
This guide is intended for Medusa v1 users. If you're a Medusa v2 user, consider using [Medusa Cloud](https://docs.medusajs.com/cloud). By using Medusa Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance.
17+
18+
With Medusa Cloud, you also maintain full customization control as you deploy your own modules and customizations directly from GitHub:
1719

18-
Railway provides a free trial (no credit card required) that allows you to deploy your Medusa backend along with PostgreSQL and Redis databases. This is useful mainly for development and demo purposes.
20+
1. Push to deploy.
21+
2. Multiple testing environments.
22+
3. Preview environments for new PRs.
23+
4. Test on production-like data.
1924

20-
<a
21-
href="https://railway.app/template/zC7eOq?referralCode=TW4Qi0" className="img-url no-zoom-img mb-2 inline-block">
22-
<img src="https://railway.app/button.svg" alt="Deploy with Railway" className="no-zoom-img"/>
23-
</a>
25+
Refer to the [Cloud vs. Self-Hosting comparison guide](https://docs.medusajs.com/cloud/comparison) for more details.
26+
27+
</Note>
28+
29+
## What is Railway
30+
31+
[Railway](https://railway.app/) is a hosting provider that you can use to deploy web applications and databases without having to worry about managing the full infrastructure.
2432

2533
<Note type="check">
2634

0 commit comments

Comments
 (0)