Skip to content

Commit

Permalink
feat: Add instructions for self-hosting (#491)
Browse files Browse the repository at this point in the history
* Done

* remove generating docker images

* wording
  • Loading branch information
storm1729 authored Dec 14, 2024
1 parent 8b435a4 commit b01f938
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
"use client";

import { Dictionary } from "@/dictionaries";
import { Button, Card, Text } from "@/components/Geist";
import { Button, Card, Snippet, Spacer, Text } from "@/components/Geist";
import Markdown from "marked-react";
import React from "react";
import Link from "next/link";
import { UserDetails } from "@/supabase/supabaseServer";

export function GetStartedCommercial(props: { d: Dictionary }) {
export function GetStartedCommercial(props: {
userDetails: UserDetails;
d: Dictionary;
}) {
const d = props.d.dashboard.get_started_license;
const { userDetails } = props;

return (
<Card>
<Text h3>{d.title}</Text>

<Markdown>{d.explanation}</Markdown>
<div className="text-center">
<Button type="success">Request a Free Trial</Button>
</div>
</Card>
<>
<Card>
<Text h3>{d.run_docker_title}</Text>
<Markdown>{d.run_docker_setup_server}</Markdown>
<Snippet
symbol=""
text={`docker run -p 8080:8080 -e RCH__COMMERCIAL_LICENSE_TRIAL__API_TOKEN-${userDetails.api_token} reacherhq/commercial-license-trial:latest`}
type="lite"
width="100%"
/>
<Markdown>{d.run_docker_features}</Markdown>
<Markdown>{d.run_docker_contact}</Markdown>
</Card>
<Spacer />
<Card>
<Text h3>{d.purchase_license_title}</Text>
<Markdown>{d.purchase_license_explanation}</Markdown>
<div className="text-center">
<Link href="/pricing">
<Button type="success">
{d.purchase_license_button}
</Button>
</Link>
</div>
</Card>
</>
);
}
9 changes: 7 additions & 2 deletions src/app/[lang]/dashboard/commercial_license/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { dictionary } from "@/dictionaries";
import React from "react";
import { GetStartedCommercial } from "./GetStartedCommercial";
import { Dashboard } from "../Dashboard";
import { getSession, getSubAndCalls } from "@/supabase/supabaseServer";
import {
getSession,
getSubAndCalls,
getUserDetails,
} from "@/supabase/supabaseServer";
import { redirect } from "next/navigation";

export default async function CommercialLicensePage({
Expand All @@ -16,6 +20,7 @@ export default async function CommercialLicensePage({
}

const subAndCalls = await getSubAndCalls(session.user.id);
const userDetails = await getUserDetails();
const d = await dictionary(lang);

return (
Expand All @@ -25,7 +30,7 @@ export default async function CommercialLicensePage({
showApiUsage={false}
tab="commercial_license"
>
<GetStartedCommercial d={d} />
<GetStartedCommercial d={d} userDetails={userDetails} />
</Dashboard>
);
}
11 changes: 8 additions & 3 deletions src/dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@
"dont_worry": "Don't worry, I have prepared a [beginner's guide](https://docs.reacher.email/getting-started/quickstart) for using the API, with a program called Postman. If you still have questions, just use the chat widget on the bottom right corner to send me a message, or shoot me an email at [📧 [email protected]](mailto:[email protected])."
},
"get_started_license": {
"title": "How to get started with the Commercial License?",
"explanation": "To get started with self-hosting, please refer to our [Self-Host Guide](https://docs.reacher.email/self-hosting/install).\n\nIf you have any questions about self-hosting, please contact [✉️ [email protected]](mailto:[email protected])."
"run_docker_title": "Get Started with Reacher in 20 Minutes",
"run_docker_setup_server": "Check out our [installation guide](https://docs.reacher.email/self-hosting/install) to set up Reacher on your server. When prompted, use this command to run Reacher:",
"run_docker_features": "Your trial Docker image includes:\n- A **pre-configured proxy** from [Proxy4Smtp](https://www.proxy4smtp.com). Learn more about [proxy configuration](https://docs.reacher.email/self-hosting/proxies).\n- Up to **10000 email checks** daily.\n- Basic usage metrics **shared with Reacher** (anonymized).",
"run_docker_contact": "Need help or customization? Whether you want to use your own proxy, increase verification limits, or have other requirements - reach out to me at [✉️ [email protected]](mailto:[email protected]).",
"purchase_license_title": "Ready to Scale? Get a Commercial License",
"purchase_license_explanation": "Try the Commercial License Trial with no strict time limit - I'll check in after about two weeks to see how it's going. Once you've put Reacher through its paces, upgrade to a full Commercial License for **unlimited verifications** and **complete data privacy**. After purchase, I'll personally provide your unrestricted Dockerfile.",
"purchase_license_button": "Get Commercial License"
}
},
"footer": {
Expand Down Expand Up @@ -240,7 +245,7 @@
"button_sign_up": "Sign up",
"button_signing_up": "Signing up...",
"login": "Login",
"prevent_spam": "Due to a recent surge in spam usage of Reacher, I'm personally reviewing new signups for the Commercial License trial. Could you answer help me answer a few quick questions?",
"prevent_spam": "To ensure the best experience for all users, we're currently reviewing new Commercial License trial signups. Would you mind answering a few quick questions to help me get to know you better?",
"company_website": "Company website",
"email_volume": {
"title": "What is your monthly email volume?",
Expand Down
9 changes: 7 additions & 2 deletions src/dictionaries/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@
"dont_worry": "Ne vous inquiétez pas, j'ai préparé un [guide pour débutants](https://docs.reacher.email/getting-started/quickstart) pour utiliser l'API, avec un programme appelé Postman. Si vous avez encore des questions, utilisez simplement le widget de chat en bas à droite pour m'envoyer un message, ou envoyez-moi un e-mail à [📧 [email protected]](mailto:[email protected])."
},
"get_started_license": {
"title": "Comment commencer avec la Licence Commerciale ?",
"explanation": "Pour commencer l'auto-hébergement, veuillez vous référer à notre [Guide d'Auto-Hébergement](https://docs.reacher.email/self-hosting/install).\n\nSi vous avez des questions sur l'auto-hébergement, veuillez contacter [✉️ [email protected]](mailto:[email protected])."
"run_docker_title": "Installez Reacher en 20 minutes",
"run_docker_setup_server": "Suivez le [guide d'installation](https://docs.reacher.email/self-hosting/install) pour installer Reacher sur votre serveur. Lorsqu'on vous demande d'exécuter l'image Docker, entrez cette commande :",
"run_docker_features": "Le Dockerfile a les fonctionnalités et limitations suivantes :\n- Utilise un **proxy intégré** fourni par [Proxy4Smtp](https://www.proxy4smtp.com). En savoir plus sur les [proxies](https://docs.reacher.email/self-hosting/proxies).\n- **10000 vérifications** par jour.\n- Résultats de vérification anonymisés **envoyés à Reacher**.",
"run_docker_contact": "Si vous rencontrez des problèmes ou avez besoin de personnaliser le Dockerfile fourni (par exemple, utiliser votre propre proxy, augmenter la limite quotidienne, etc.), contactez-moi à [✉️ [email protected]](mailto:[email protected]).",
"purchase_license_title": "Acheter une Licence Commerciale",
"purchase_license_explanation": "Il n'y a pas de limite stricte sur la durée de l'essai de la Licence Commerciale, mais je vous contacterai dans un délai d'environ deux semaines. Une fois que vous aurez testé Reacher de manière approfondie sur votre serveur, achetez une Licence Commerciale pour débloquer les **vérifications d'emails illimitées** et **aucune donnée envoyée à Reacher**. Je vous contacterai peu après l'achat pour vous fournir le nouveau Dockerfile sans limitations.",
"purchase_license_button": "Acheter une Licence Commerciale"
}
},
"footer": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CREATE VIEW commercial_license_trial AS
CREATE VIEW commercial_license_trial
WITH (security_invoker = on) AS
SELECT
user_id,
COUNT(*) AS calls_last_day,
Expand Down

0 comments on commit b01f938

Please sign in to comment.