Skip to content

Commit 977f840

Browse files
carlosabadiaAlek PetuskeyAlek99Lendemor
authored
add pricing page + sales (#1098)
* add pricing page * [email protected] link * hide glow * More updates * More updates * hobby column * pricing calculator * update max ram * Changes * Pricing page touch ups * Update sales page * Whitelist * Update button for team * Update docs/hosting/deploy-quick-start.md Co-authored-by: Thomas Brandého <[email protected]> * Fix f string * whiteist --------- Co-authored-by: Alek Petuskey <[email protected]> Co-authored-by: Alek Petuskey <[email protected]> Co-authored-by: Thomas Brandého <[email protected]>
1 parent 781d45d commit 977f840

File tree

18 files changed

+1569
-626
lines changed

18 files changed

+1569
-626
lines changed

assets/logos/dark/radial_circle.svg

Lines changed: 156 additions & 0 deletions
Loading

assets/logos/light/radial_circle.svg

Lines changed: 156 additions & 0 deletions
Loading

docs/hosting/deploy-quick-start.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Reflex’s hosting service makes it easy to deploy your apps without worrying ab
1717

1818
### Prerequisites
1919

20-
1. Hosting service requires `reflex>=0.3.2`.
20+
1. Hosting service requires `reflex>=0.6.5`.
2121
2. This tutorial assumes you have successfully `reflex init` and `reflex run` your app.
2222
3. Also make sure you have a `requirements.txt` file at the top level app directory that contains all your python dependencies!
2323

@@ -43,7 +43,13 @@ reflex deploy
4343

4444
The command is by default interactive. It asks you a few questions for information required for the deployment.
4545

46-
**Name**: choose a name for the deployed app. This name will be part of the deployed app URL, i.e. `<app-name>.reflex.run`. The name should only contain domain name safe characters: no slashes, no underscores. Domain names are case insensitive. To avoid confusion, the name you choose here is also case insensitive. If you enter letters in upper cases, we automatically convert them to lower cases.
46+
**Name**: choose a name for the deployed app. This name will be part of the deployed app URL, i.e. `<app-name>-randomword-randomword.reflex.run`.
47+
48+
The name should only contain domain name safe characters: no slashes, no underscores.
49+
50+
```md alert info
51+
# Custom domains are available for paid plans.
52+
```
4753

4854
**Regions**: enter the region code here or press `Enter` to accept the default. The default code `sjc` stands for San Jose, California in the US west coast. Check the list of supported regions at [reflex deployments regions](#reflex-deployments-regions).
4955

@@ -52,13 +58,7 @@ The command is by default interactive. It asks you a few questions for informati
5258
That’s it! You should receive some feedback on the progress of your deployment and in a few minutes your app should be up. 🎉
5359

5460
```md alert info
55-
# Once your code is uploaded, the hosting service will start the deployment. After a complete upload, exiting from the command **does not** affect the deployment process. The command prints a message when you can safely close it without affecting the deployment.
56-
```
57-
58-
The hosting service does not currently handle database or file upload operations. It is necessary to set up an external database use it within your app.
59-
60-
```md alert info
61-
# If you want to deploy on a custom URL we recommend using https://redirect.pizza
61+
# The hosting service does not currently handle database or file upload operations. Set up an external database and use it within your app.
6262
```
6363

6464
## See it in Action

docs/hosting/hosting-cli-commands.md

Lines changed: 14 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,8 @@ To redeploy or update your app, navigate to the project directory and type `refl
5656

5757
All the `reflex` commands come with a help manual. The help manual lists additional command options that may be useful. You type `--help` to see the help manual. Some commands are organized under a `subcommands` series. Here is an example below. Note that the help manual may look different depending on the version of `reflex` or the `reflex-hosting-cli`.
5858

59-
```python eval
60-
doccmdoutput(
61-
command="reflex deployments --help",
62-
output="""Usage: reflex deployments [OPTIONS] COMMAND [ARGS]...
63-
64-
Subcommands for managing the Deployments.
65-
66-
Options:
67-
--help Show this message and exit.
68-
69-
Commands:
70-
build-logs Get the build logs for a deployment.
71-
delete Delete a hosted instance.
72-
list List all the hosted deployments of the authenticated user.
73-
logs Get the logs for a deployment.
74-
regions List all the regions of the hosting service.
75-
status Check the status of a deployment.
76-
"""
77-
)
59+
``` bash
60+
reflex deployments --help
7861
```
7962

8063
### Authentication Commands
@@ -83,13 +66,8 @@ Commands:
8366

8467
When you type the `reflex login` command for the very first time, it opens the hosting service login page in your browser. We authenticate users through OAuth. At the moment the supported OAuth providers are Github and Gmail. You should be able to revoke such authorization on your Github and Google account settings page. We do not log into your Github or Gmail account. OAuth authorization provides us your email address and in case of Github your username handle. We use those to create an account for you. The email used in the original account creation is used to identify you as a user. If you have authenticated using different emails, those create separate accounts. To switch to another account, first log out using the `reflex logout` command. More details on the logout command are in [reflex logout](#reflex-logout) section.
8568

86-
```python eval
87-
doccmdoutput(
88-
command="reflex login",
89-
output="""Opening https://control-plane.reflex.run ...
90-
Successfully logged in.
91-
""",
92-
)
69+
``` bash
70+
reflex login
9371
```
9472

9573
After authentication, the browser redirects to the original hosting service login page. It shows that you have logged in. Now you can return to the terminal where you type the login command. It should print a message such as `Successfully logged in`.
@@ -108,55 +86,8 @@ This is the command to deploy a reflex app from its top level app directory. Thi
10886

10987
A `requirements.txt` file is required. The deploy command checks the content of this file against the top level packages installed in your current Python environment. If the command detects new packages in your Python environment, or newer versions of the same packages, it prints the difference and asks if you would like to update your `requirements.txt`. Make sure you double check the suggested updates. This functionality is added in more recent versions of the hosting CLI package `reflex-hosting-cli>=0.1.3`.
11088

111-
```python eval
112-
doccmdoutput(
113-
command="reflex deploy",
114-
output="""Info: The requirements.txt may need to be updated.
115-
--- requirements.txt
116-
+++ new_requirements.txt
117-
@@ -1,3 +1,3 @@
118-
-reflex>=0.2.0
119-
-openai==0.28
120-
+openai==0.28.0
121-
+reflex==0.3.8
122-
123-
Would you like to update requirements.txt based on the changes above? [y/n]: y
124-
125-
Choose a name for your deployed app (https://<picked-name>.reflex.run)
126-
Enter to use default. (webui-gray-sun): demo-chat
127-
Region to deploy to. See regions: https://bit.ly/46Qr3mF
128-
Enter to use default. (sjc): lax
129-
Environment variables for your production App ...
130-
* env-1 name (enter to skip): OPENAI_API_KEY
131-
env-1 value: sk-*********************
132-
* env-2 name (enter to skip):
133-
Finished adding envs.
134-
──────────────── Compiling production app and preparing for export. ────────────────
135-
Zipping Backend: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 12/12 0:00:00
136-
Uploading Backend code and sending request ...
137-
Backend deployment will start shortly.
138-
──────────────── Compiling production app and preparing for export. ────────────────
139-
Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 9/9 0:00:00
140-
Creating Production Build: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 9/9 0:00:07
141-
Zipping Frontend: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 20/20 0:00:00
142-
Uploading Frontend code and sending request ...
143-
Frontend deployment will start shortly.
144-
───────────────────────────── Deploying production app. ────────────────────────────
145-
Deployment will start shortly: https://demo-chat.reflex.run
146-
Closing this command now will not affect your deployment.
147-
Waiting for server to report progress ...
148-
2024-01-12 12:24:54.188271 PST | Updating frontend...
149-
2024-01-12 12:24:55.074264 PST | Frontend updated!
150-
2024-01-12 12:24:55.137679 PST | Deploy success (frontend)
151-
2024-01-12 12:24:59.722384 PST | Updating backend...
152-
2024-01-12 12:25:01.006386 PST | Building backend image...
153-
2024-01-12 12:26:03.672379 PST | Deploying backend image...
154-
2024-01-12 12:26:21.017946 PST | Backend updated!
155-
2024-01-12 12:26:21.018003 PST | Deploy success (backend)
156-
Waiting for the new deployment to come up
157-
Your site [ demo-chat ] at ['lax'] is up: https://demo-chat.reflex.run
158-
""",
159-
)
89+
``` bash
90+
reflex deploy
16091
```
16192

16293
The deploy command is by default interactive. To deploy without interaction, add `--no-interactive` and set the relevant command options as deployment settings. Type `reflex deploy --help` to see the help manual for explanations on each option. The deploy sequences are the same, whether the deploy command is interactive or not.
@@ -169,40 +100,16 @@ reflex deploy --no-interactive -k todo -r sjc -r sea --env OPENAI_API_KEY=YOU-KE
169100

170101
List all your deployments.
171102

172-
```python eval
173-
doccmdoutput(
174-
command="reflex deployments list",
175-
output="""key regions app_name reflex_version cpus memory_mb url envs
176-
---------------------------- ------- -------------------- ---------------- ------- ----------- ------------------------------------------ ---------
177-
webui-navy-star ['sjc'] webui 0.3.7 1 1024 https://webui-navy-star.reflex.run ['OPENAI_API_KEY']
178-
chatroom-teal-ocean ['ewr'] chatroom 0.3.2 1 1024 https://chatroom-teal-ocean.reflex.run []
179-
sales-navy-moon ['phx'] sales 0.3.4 1 1024 https://sales-navy-moon.reflex.run []
180-
simple-background-tasks ['yul'] lorem_stream 0.3.7 1 1024 https://simple-background-tasks.reflex.run []
181-
snakegame ['sjc'] snakegame 0.3.3 1 1024 https://snakegame.reflex.run []
182-
basic-crud-navy-apple ['dfw'] basic_crud 0.3.8 1 1024 https://basic-crud-navy-apple.reflex.run []
183-
""",
184-
)
103+
``` bash
104+
reflex deployments list
185105
```
186106

187107
#### reflex deployments status `app-name`
188108

189109
Get the status of a specific app, including backend and frontend.
190110

191-
```python eval
192-
doccmdoutput(
193-
command="reflex deployments status clock-gray-piano",
194-
output="""Getting status for [ clock-gray-piano ] ...
195-
196-
backend_url reachable updated_at
197-
----------------------------------------- ----------- ------------
198-
https://rxh-prod-clock-gray-piano.fly.dev False N/A
199-
200-
201-
frontend_url reachable updated_at
202-
----------------------------------------- ----------- -----------------------
203-
https://clock-gray-piano.reflex.run True 2023-10-13 15:23:07 PDT
204-
""",
205-
)
111+
``` bash
112+
reflex deployments status clock-gray-piano
206113
```
207114

208115
#### reflex deployments logs `app-name`
@@ -213,52 +120,16 @@ The returned logs are the messages printed to console. If you have `print` state
213120

214121
We have added more options to this command including `from` and `to` timestamps and the limit on how many lines of logs to fetch. Accepted timestamp formats include the ISO 8601 format, unix epoch and relative timestamp. A relative timestamp is some time units ago from `now`. The units are `d (day), h (hour), m (minute), s (second)`. For example, `--from 3d --to 4h` queries from 3 days ago up to 4 hours ago. For the exact syntax in the version of CLI you use, refer to the help manual.
215122

216-
```python eval
217-
doccmdoutput(
218-
command="reflex deployments logs todo",
219-
output="""Note: there is a few seconds delay for logs to be available.
220-
2023-10-13 22:18:39.696028 | rxh-dev-todo | info | Pulling container image registry.fly.io/rxh-dev-todo:depot-1697235471
221-
2023-10-13 22:18:41.462929 | rxh-dev-todo | info | Pulling container image registry.fly.io/rxh-dev-todo@sha256:60b7b531e99e037f2fb496b3e05893ee28f93a454ee618bda89a531a547c4002
222-
2023-10-13 22:18:45.963840 | rxh-dev-todo | info | Successfully prepared image registry.fly.io/rxh-dev-todo@sha256:60b7b531e99e037f2fb496b3e05893ee28f93a454ee618bda89a531a547c4002 (4.500906837s)
223-
2023-10-13 22:18:46.134860 | rxh-dev-todo | info | Successfully prepared image registry.fly.io/rxh-dev-todo:depot-1697235471 (6.438815793s)
224-
2023-10-13 22:18:46.210583 | rxh-dev-todo | info | Configuring firecracker
225-
2023-10-13 22:18:46.434645 | rxh-dev-todo | info | [ 0.042971] Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!
226-
2023-10-13 22:18:46.477693 | rxh-dev-todo | info | [ 0.054250] PCI: Fatal: No config space access function found
227-
2023-10-13 22:18:46.664016 | rxh-dev-todo | info | Configuring firecracker
228-
""",
229-
)
123+
``` bash
124+
reflex deployments logs todo
230125
```
231126

232127
#### reflex deployments build-logs `app-name`
233128

234129
Get the logs of the hosting service deploying the app.
235130

236-
```python eval
237-
doccmdoutput(
238-
command="reflex deployments build-logs webcam-demo",
239-
output="""Note: there is a few seconds delay for logs to be available.
240-
2024-01-08 11:02:46.109785 PST | fly-controller-prod | #8 extracting sha256:bd9ddc54bea929a22b334e73e026d4136e5b73f5cc29942896c72e4ece69b13d 0.0s done | None | None
241-
2024-01-08 11:02:46.109811 PST | fly-controller-prod | #8 DONE 5.3s | None | None
242-
2024-01-08 11:02:46.109834 PST | fly-controller-prod | | None | None
243-
2024-01-08 11:02:46.109859 PST | fly-controller-prod | #8 [1/4] FROM public.ecr.aws/p3v4g4o2/reflex-hosting-base:v0.1.8-py3.11@sha256:9e8569507f349d78d41a86e1eb29a15ebc9dece487816875bbc874f69dcf7ecf | None | None
244-
...
245-
...
246-
2024-01-08 11:02:50.913748 PST | fly-controller-prod | #11 [4/4] RUN . /home/reflexuser/venv/bin/activate && pip install --no-color --no-cache-dir -q -r /home/reflexuser/app/requirements.txt reflex==0.3.4 | None | None
247-
...
248-
...
249-
2024-01-08 11:03:07.430922 PST | fly-controller-prod | #12 pushing layer sha256:d9212ef47485c9f363f105a05657936394354038a5ae5ce03c6025f7f8d2d425 3.5s done | None | None
250-
2024-01-08 11:03:07.881471 PST | fly-controller-prod | #12 pushing layer sha256:ee46d14ae1959b0cacda828e5c4c1debe32c9c4c5139fb670cde66975a70c019 3.9s done | None | None
251-
...
252-
2024-01-08 11:03:13.943166 PST | fly-controller-prod | Built backend image | None | None
253-
2024-01-08 11:03:13.943174 PST | fly-controller-prod | Deploying backend image... | None | None
254-
2024-01-08 11:03:13.943311 PST | fly-controller-prod | Running sys_run | None | None
255-
...
256-
2024-01-08 11:03:31.005887 PST | fly-controller-prod | Checking for valid image digest to be deployed to machines... | None | None
257-
2024-01-08 11:03:31.005893 PST | fly-controller-prod | Running sys_run | None | None
258-
2024-01-08 11:03:32.411762 PST | fly-controller-prod | Backend updated! | None | None
259-
2024-01-08 11:03:32.481276 PST | fly-controller-prod | Deploy success (backend) | None | None
260-
""",
261-
)
131+
``` bash
132+
reflex deployments build-logs webcam-demo
262133
```
263134

264135
The hosting service prints log messages when preparing and deploying your app. These log messages are called build logs. Build logs are useful in troubleshooting deploy failures. For example, if there is a package `numpz==1.26.3` (supposed to be `numpy`) in the `requirements.txt`, hosting service will be unable to install it. That package does not exist. We expect to find a few lines in the build logs indicating that the `pip install` command fails.

pcweb/components/docpage/navbar/navbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from pcweb.pages.docs import getting_started, hosting
2323
from pcweb.pages.faq import faq
24-
from pcweb.pages.pricing import pricing
24+
from pcweb.pages.pricing.pricing import pricing
2525
from pcweb.pages.errors import errors
2626
from pcweb.pages.docs.library import library
2727
from pcweb.pages.blog import blogs
@@ -324,7 +324,7 @@ def new_component_section() -> rx.Component:
324324
),
325325
),
326326
nav_menu.item(
327-
link_item("Pricing", pricing.path, "pricing"),
327+
link_item("Pricing", "/pricing", "pricing"),
328328
),
329329
class_name="desktop-only flex flex-row items-center gap-0 lg:gap-7 m-0 h-full list-none",
330330
),

pcweb/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
GALLERY_FORM_URL = "https://docs.google.com/forms/d/e/1FAIpQLSfB30hXB09CZ_H0Zi684w1y1zQSScyT3Qhd1mOUrAAIq9dj3Q/viewform?usp=sf_link"
3131
NPMJS_URL = "https://www.npmjs.com/"
3232
SPLINE_URL = "https://github.com/splinetool/react-spline"
33+
HOSTING_URL = "https://cloud.staging.reflexcorp.run"
3334

3435
# Install urls.
3536
BUN_URL = "https://bun.sh"

pcweb/pages/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
from .docs import doc_routes
66
from .faq import faq
77
from .index import index
8-
from .pricing import pricing
98
from .page404 import page404
109
from .errors import errors
1110
from .gallery import gallery
1211
from .customers.landing import customers
1312
from .customers.data.customers import customers_routes
1413
from .gallery.apps import gallery_apps_routes
1514
from .hosting_countdown.hosting_countdown import hosting_countdown
16-
15+
from .pricing.pricing import pricing
16+
from .sales import sales
1717
routes = [
1818
*[r for r in locals().values() if isinstance(r, Route) and r.add_as_page],
1919
*blog_routes,

0 commit comments

Comments
 (0)