How to use"Supervisor" along with Apache and Uvicorn for 1 self contained image. This is an "MVP" at this stage but it works 100% and Authentication would be the next task. Rather than use Flask, whatI have done here is create a Docker image with FastAPI and a HMTL/JavaScript front end that will run in a Single container.
Note: this if for MVP / Demo purposes, in production you would use separate containers and a Docker network: https://docs.docker.com/network/bridge/
aka : How to expose 2 ports in docker : Apache (html & js), Uvicorn (FastAPI)
📍 Check out these amazing FastAPI courses 📍
🔗 https://testdriven.io/courses/tdd-fas...
🔗 https://testdriven.io/courses/scalabl...
🔗 https://testdriven.io/courses/fastapi...
--------------------------------------------------------------------------------------------------------------------------
👍 If you would like to, maybe become a patron on Patreon? 👍
🌏 / drpi
--------------------------------------------------------------------------------------------------------------------------
-- chapters --
00:00 intro
03:05 supervisor (how to run 2 services)
06:07 Travis "How to deploy FastAPI with Nginx and Supervisor"
10:20 The front end running inside the Docker image
15:10 view logs - Docker from vscode
17:48 project summary
------------------------------------------
FastAPI playlist : • FastAPI full projects (Docker, HTML, JavaS...
FastAPI + Docker ~ Series playlist : • FastAPI + Docker
Download the docker image and try it out for yourself!
$docker pull redandgreen/subnet-api:1
Full Project available here : 🌏 https://github.com/RGGH/ip_checker
Useful links:
-----------------------------------------------------------------------------------------------
https://levelup.gitconnected.com/crea...
https://techexpert.tips/docker/docker...
https://docs.docker.com/config/contai...
https://linuxhint.com/how-to-create-a...
https://phoenixnap.com/kb/how-to-comm...
----------------------------------------------------------------------------------------------
🌏 https://github.com/RGGH/ip_checker/bl... for the supervisor config
🌏 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 5000 free API calls. No credit card required.)
👍 Become a patron 👍
🌏 / drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
🔵 Proxies 🔵
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! 👍
🌏 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
https://linuxhint.com/how-to-create-a...
Thumbs up yeah? (cos Algos..)
#docker #fastapi #pythontutorial
En esta página del sitio puede ver el video en línea How to Dockerize FastAPI | Complete MVP | Python + HTML & JavaScript de Duración hora minuto segunda en buena calidad , que subió el usuario jobstr 11 agosto 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 433 veces y le gustó 7 a los espectadores. Disfruta viendo!