reflex/docker-example
Masen Furer 1d4603c60a
Add production-one-port example
A more complex version of simple-one-port that facilitates better layer caching
to shorten build times and multi-stage build to reduce final image size.

Harder to understand, but ultimately nicer to use.
2024-12-05 11:37:41 -08:00
..
production-app-platform Path change after Astral 0.5.0 update (#4336) 2024-11-12 09:57:58 -08:00
production-compose Path change after Astral 0.5.0 update (#4336) 2024-11-12 09:57:58 -08:00
production-one-port Add production-one-port example 2024-12-05 11:37:41 -08:00
simple-one-port Update docker-example (#3324) 2024-09-08 19:21:05 -07:00
simple-two-port Update docker-example (#3324) 2024-09-08 19:21:05 -07:00
README.md Update docker-example (#3324) 2024-09-08 19:21:05 -07:00

Reflex Docker Examples

This directory contains several examples of how to deploy Reflex apps using docker.

In all cases, ensure that your requirements.txt file is up to date and includes the reflex package.

simple-two-port

The most basic production deployment exposes two HTTP ports and relies on an existing load balancer to forward the traffic appropriately.

simple-one-port

This deployment exports the frontend statically and serves it via a single HTTP port using Caddy. This is useful for platforms that only support a single port or where running a node server in the container is undesirable.

production-compose

This deployment is intended for use with a standalone VPS that is only hosting a single Reflex app. It provides the entire stack in a single compose.yaml including a webserver, one or more backend instances, redis, and a postgres database.

production-app-platform

This example deployment is intended for use with App hosting platforms, like Azure, AWS, or Google Cloud Run. It is the backend of the deployment, which depends on a separately hosted redis instance and static frontend deployment.