{"repo":"GrantBirki/caddy-fastapi","free":true,"listed":false,"github":"https://github.com/GrantBirki/caddy-fastapi","clone":"git clone https://github.com/GrantBirki/caddy-fastapi.git","description":"Quickly deploy Caddy to serve requests with FastAPI using docker-compose!","language":"Dockerfile","stars":42,"topics":["docker-compose","caddy","fastapi","python","template","docker"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"caddy-fastapi ⛳ This is a template repo to deploy Caddy + FastAPI with docker compose Usage 🔨 To use this repo simply do the following: 1. Clone the repo 1. Run the following command: 1. Navigate to your domain: localhost That's it! TLS Certificate 🔐 Caddy automatically provisions TLS certificates for you. In order to make use of this awesome feature, do the following: 1. Ensure your server has ports 80 and 443 open 1. Have a DNS record pointed to your server for the domain you wish to obtain a certificate for (e.g. app.example.org - ) 1. Export the env var for the domain you wish to use: 1. Start the docker compose stack: 1. Navigate to your domain and enjoy your easy TLS setup with Caddy! - https://app.example.org Extra Info 📚 Here is some extra info about the setup Volumes 🛢️ The docker compose file creates two volumes: - ./data/caddy data:/data - ./data/caddy config:/config The config volume is used to mount Caddy configuration The data volume is used to store certificate information. This is really important so that you are not re-requesting TLS certs each time you start your container. Doing so can cause you to hit Let's Encrypt rate limits that will prevent you from provisioning certificates. Environment Variables 📝 If you run the stack without the DOMAIN variable set in your environment, the stack will default to using localhost . This is ideal for testing out the stack locally. If you set the DOMAIN variable, Caddy will attempt to provision a certificate for tha","default_branch":null,"files":null,"tree":[],"storefront":"/r/GrantBirki","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/GrantBirki/caddy-fastapi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}