Self Hosting Guide and Discussion #802
Replies: 6 comments 9 replies
-
is "--port 80" means "--backend-port 80"? :) |
Beta Was this translation helpful? Give feedback.
-
How do you make the deployment run in the background? |
Beta Was this translation helpful? Give feedback.
-
can anyone tell how can we deploy both frontend and backend on IIS server |
Beta Was this translation helpful? Give feedback.
-
Any help on self-hosting in Azure? In a container app you only have one port for ingress so the deployment won't work for Reflex. My line of thinking is to have a Web App for the front end and a Container app for the back end. The web app then can reroute the requests to the back end. Is it possible to reroute the calls to the rx.State as well? |
Beta Was this translation helpful? Give feedback.
-
Can I make the deployment in GitHub pages? I only use the frontend, Every time I try to upload it through a static page it generates a backend error on port 8000... but my page will not use a backend, nor will it have a backend |
Beta Was this translation helpful? Give feedback.
-
How can I apply an SSL cert through this digital ocean config? |
Beta Was this translation helpful? Give feedback.
-
This is a short guide on how to deploy an app on your own server. In this example, we will use DigitalOcean, but you can use any hosting provider.
1. Get a Cloud VM
2. Setup the environment.
You should have a public IP address for your VM to SSH into.
Make sure you have installed
python3
,pip
,nodejs
, andzip
.Now install Reflex
3. Clone and run your app
Clone your code - we will just run the snake game example app.
git clone https://github.com/reflex-dev/reflex-examples.git cd reflex-examples/snakegame
Update the
api_url
in therxconfig.py
with your IP address. Make sure to includehttp://
in the front.Now you can init and run the app in production mode on port 80. (Feel free to test in dev mode first).
reflex init reflex run --port 80 # dev mode test reflex run --env prod --port 80
You should now see your app live at your IP address.
Screen.Recording.2023-04-10.at.8.07.52.PM.mov
The next step would be to point your domain name to your IP.
Of course, this is a very basic, manual way to deploy. We will make a similar guide with Docker, and we are working on our
reflex deploy
service for one command deployment.Hope this helps!
Beta Was this translation helpful? Give feedback.
All reactions