How to Deploy a Secure API with FastAPI, Docker and Traefik

A guide to configuring HTTPS

Ahmed Besbes
Towards Data Science
9 min readJul 21, 2021

--

Photo by FLY:D on Unsplash

When we deploy an API to serve a machine learning model, we rarely care about that green padlock that makes the HTTP connection supposedly safe and the browser happy.

--

--

Medium Top Writer (+2M views) | I write about python and productionizing ML code into scalable apps. Exclusive content here: https://thetechbuffet.substack.com/