Deploying FastAPI Apps Over HTTPS with Traefik Proxy

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • Learn how to easily build a modern web API in Python with FastAPI and then deploy it to production with HTTPS, powered by Traefik, to serve all your cloud needs.
    This session start swith a simple FastAPI application developed locally and end with it deployed on a remote DigitalOcean cloud server, properly secured and served with HTTPS using Traefik.
    In this event you'll learn, step by step, how to:
    * Create a simple FastAPI application, running locally.
    * Create a Docker image for our application, using the official Docker images for FastAPI.
    * Run and test it locally with Docker Compose.
    * Set up a remote cloud server in DigitalOcean from scratch.
    * Install and configure the necessary components.
    * Configure the DNS records for the domain.
    * Configure and set up Traefik in the cloud server.
    * Add the necessary configurations to connect the FastAPI application with Traefik.
    * Transfer, build, and deploy the application.
    * Review how Traefik acquires and updates the certificates with Let's Encrypt.
    * Check and ensure that HTTPS is working.
    Q & A from the session: gist.github.co...
    About Sebastián:
    Sebastián Ramírez (@tiangolo) is the creator of FastAPI, Typer, and other open source tools.
    For more about Traefik Labs visit: www.traefik.io

Комментарии • 48

  • @bahadirkacar
    @bahadirkacar 3 года назад +15

    "THE MAN" HIMSELF OMG

  • @georgerobertkplivi6250
    @georgerobertkplivi6250 2 года назад +7

    Who best to explain Fastapi than the creator himself. ❤️
    I'm honoured to be before you. God of Fastapi 🤗

  • @softcoda
    @softcoda 3 года назад +10

    Wowww...one if the best complete tutorials simplified and packed this one video. It's amazing all your explanations are just on point. 👌 I have come to understand so many concepts from docker, docker-composr, https, etc....👌👌👌

  • @maheshkariya
    @maheshkariya 3 года назад +2

    Now I started to make videos on Fast API and here is the creator 🙂

    • @pablogonzalezrobles4429
      @pablogonzalezrobles4429 3 года назад

      Do You know how to deploy fastApi in a cPanel shared server? Just want to know if that is possible

  • @Luk4s97
    @Luk4s97 5 месяцев назад

    Nice Explanations! I didnt get my app working with traefik on a remote host with multiple other tutorials. Now it finally works, thanks alot

  • @88andreaw
    @88andreaw 3 года назад +12

    This is really useful! Thank you Sebastian! 🇨🇴

  • @josesavioli3982
    @josesavioli3982 4 месяца назад

    Super nice explanation! The best material and explanation on docker with traefik and basic api configuration!

  • @r.sp.378
    @r.sp.378 Год назад +1

    thanks for this video, i finally got a grasp of docker and docker-compose. Great video overall.

  • @imj5296
    @imj5296 3 года назад +3

    This is the best tutorial ever!

  • @FedericoCipriani27
    @FedericoCipriani27 3 года назад +3

    Thanks for such tutorial... Gracias! It would be very useful to have a gist with the code used. Cheers,

    • @TraefikLabs
      @TraefikLabs  3 года назад +2

      He provides some resources here: dev.to/tiangolo/deploying-fastapi-and-other-apps-with-https-powered-by-traefik-5dik

  • @eduardogil1775
    @eduardogil1775 3 года назад +1

    Exelente video, Gracias por compartir! 😎

  • @madsfrost9464
    @madsfrost9464 3 года назад +2

    This is just what I needed, thank you :)

  • @jacobstrauss3835
    @jacobstrauss3835 Год назад

    Amazing video thank you Sebastián!!

  • @hamitaksln
    @hamitaksln 2 года назад +1

    Great tutorial. Thanks a lot!

  • @lbasavaraj
    @lbasavaraj 3 года назад +4

    Thanks a ton,
    Followed every step, but stuck with 404 error after adding traefik @38:00.
    Can some one please please help if you came across this? I have been stuck on this for days

    • @TraefikLabs
      @TraefikLabs  3 года назад

      Please share your issues at the Community Forum. Thanks! community.traefik.io/

  • @TheAmazingpower
    @TheAmazingpower 3 года назад +3

    Thank you for sharing this, I didn't know traefik and FastAPI are that powerful. Is there a repo to the code used in this session?

    • @TraefikLabs
      @TraefikLabs  3 года назад +3

      He provides some resources here: dev.to/tiangolo/deploying-fastapi-and-other-apps-with-https-powered-by-traefik-5dik

  • @LukePighetti
    @LukePighetti Год назад

    21:00 I have never seen this use of haveged before. Can someone give me a little more information on why it's used in this context with docker-compose, and if it's still needed in 2023?

  • @rawgov
    @rawgov 2 года назад

    I'm very new to API development. I thought that I'll need an NGINX server to scale up the backend. Is Traefik a replacement for Nginx? Or should I add Nginx underneath this? Sorry if this is a noob question.

  • @NiKo-yn4wn
    @NiKo-yn4wn 3 года назад +1

    Why creating two docker-compose files? Wouldn't it be simpler to create all services (traefik, backend, etc) or am I missing something?

    • @ApartmentAngelsFireStarters
      @ApartmentAngelsFireStarters Год назад

      Docker-compose are scope bound, its like if you have 2 computers, 1 runs on port 80 on their ip, and the 2nd one also runs something on port 80. If you ran the same software on 1 computer 2 times on port 80, you can't do it.

  • @mehmetaliozer2403
    @mehmetaliozer2403 3 года назад +1

    Is there any repository for the project, I couldn't find it. Thanks.

  • @felixeduardomirandateran824
    @felixeduardomirandateran824 2 года назад

    hi, is an extension that u use to detect the virtual enviroment?

  • @okay_1204
    @okay_1204 3 года назад +1

    Is it possible to have something like mydomain.me for a website running on netlify, and then app.mydomain.me for my FastAPI application running on DigitalOcean? I don't know why but my API keeps going down randomly

    • @paularah8877
      @paularah8877 3 года назад

      Yes. I did this recently. create a subdomain record in your netlify DNS and have it point to the IP address of your VPS. set the rules on your router for the specific service you're routing to and that should do it.

  • @nehz_ttv
    @nehz_ttv 2 года назад

    Better!!!

  • @muhammedhusseinkarimi1002
    @muhammedhusseinkarimi1002 Год назад +1

    Why not create a network with docker compose

  • @hackwithharsha5228
    @hackwithharsha5228 3 года назад +3

    00:23:24 - is it good practice to use `rsync` for production applications. I have seen people install git in the remote server and then clone repository, please confirm if someone knows, when to use `rsync` and `git clone` ?

    • @TraefikLabs
      @TraefikLabs  3 года назад +2

      Please feel free to ping Sebastian on Twitter: twitter.com/tiangolo

    • @hackwithharsha5228
      @hackwithharsha5228 3 года назад +2

      @Francisco Javier Lendinez Tirado Thank You for taking your time to resolve my query...

    • @mmoralitos99
      @mmoralitos99 2 года назад

      in my litle experience, you will have to deal with more credentials, copying the files you need to prod instead whole project content also leaves you more space in pro

  • @user-dw2il9ij8k
    @user-dw2il9ij8k 2 года назад

    how can I deploy FastAPI app on my own cpanel host ??

  • @mukulkumar-xn2vx
    @mukulkumar-xn2vx Год назад

    can you run this fastapi app in iis server?

  • @Xjdivjnzj65386
    @Xjdivjnzj65386 3 года назад +1

    Thanks
    would you explain how to deploy FastAPI on cpanel?

  • @ianrickey208
    @ianrickey208 3 года назад +3

    Sebastian - I need 4 years experience with FastAPI to get a job. Can you help? /s

    • @hackwithharsha5228
      @hackwithharsha5228 3 года назад +2

      Looks like, FastAPI itself released in 2019.. How anyone will get 4 years experience ?

    • @ianrickey208
      @ianrickey208 3 года назад +2

      @@hackwithharsha5228 that was Sabastian’s problem too /s

    • @hackwithharsha5228
      @hackwithharsha5228 3 года назад

      @@ianrickey208 Yup, I have seen his tweet after your comment.. :)

    • @cristian-bull
      @cristian-bull 3 года назад +3

      - It was created in 2019. How come you have 4 years of experience?
      - overtime

    • @ianrickey208
      @ianrickey208 3 года назад +1

      @@cristian-bull boss answer Cristian!