proxy updates

This commit is contained in:
Timothy Pidashev
2024-03-06 14:55:36 -08:00
parent 8f57e420b5
commit 9204d1c569
12 changed files with 81 additions and 33 deletions

View File

@@ -0,0 +1,3 @@
.web
__pycache__/*
Dockerfile

4
src/landing/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/

View File

@@ -0,0 +1,20 @@
FROM python:3.11
# Copy local context to `/app` inside container (see .dockerignore)
WORKDIR /app
COPY . .
# Install app requirements and reflex in the container
RUN pip install -r requirements.txt
# Deploy templates and prepare app
RUN reflex init
# Download all npm dependencies and compile frontend
RUN reflex export --frontend-only --no-zip
# Needed until Reflex properly passes SIGTERM on backend.
STOPSIGNAL SIGKILL
# Always apply migrations before starting the backend.
CMD reflex run --env dev

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

View File

@@ -0,0 +1,35 @@
"""Welcome to Reflex! This file outlines the steps to create a basic app."""
from rxconfig import config
import reflex as rx
docs_url = "https://reflex.dev/docs/getting-started/introduction"
filename = f"{config.app_name}/{config.app_name}.py"
class State(rx.State):
"""The app state."""
def index() -> rx.Component:
return rx.center(
rx.theme_panel(),
rx.vstack(
rx.heading("Welcome to Reflex!", size="9"),
rx.text("Get started by editing ", rx.code(filename)),
rx.button(
"Check out our docs!",
on_click=lambda: rx.redirect(docs_url),
size="4",
),
align="center",
spacing="7",
font_size="2em",
),
height="100vh",
)
app = rx.App()
app.add_page(index)

View File

@@ -0,0 +1 @@
reflex==0.4.3

5
src/landing/rxconfig.py Normal file
View File

@@ -0,0 +1,5 @@
import reflex as rx
config = rx.Config(
app_name="landing",
)