Caching with Redis and Deployment on Ubuntu (DigitalOcean) and Netlify
In this chapter, we are going to explore yet another deployment setup – a robust Uvicorn/Gunicorn/Nginx solution that has been tried and tested with Django and other WSGIs but also ASGI web applications. This should give you more than enough choices when starting your next FARM stack project. We will also add a simple caching solution with Redis, relieving MongoDB from some requests that could (and should!) be cached and served directly. Finally, we will deploy our React-based frontend on Netlify, another very popular deployment option, whose simplicity matches its flexibility.
In this chapter, we will cover the following topics:
- Creating an account on DigitalOcean (optional)
- Preparing our Ubuntu server with Nginx
- Deployment of a FastAPI instance through Uvicorn, Gunicorn, and Nginx
- Caching with Redis
- Creating a free account on Netlify
- Deployment of the React Frontend on Netlify...