941 B
941 B
Contabo Docker Deployment
This project runs as a single FastAPI container that also serves the frontend files from frontend/.
Files used for deployment
Dockerfilebuilds the API image.docker-compose.ymlruns the API, MySQL, and Nginx proxy..dockerignorekeeps the image build context small..env.docker.exampleshows the runtime variables needed on Contabo.nginx/default.confproxies public traffic to the app container.
Deployment flow
- Copy
.env.docker.exampleto.envand fill in your real values. - Point
FRONTEND_URLto your domain once it is live. - Run
docker compose up -d --buildon the Contabo VPS. - Open port 80 in the Contabo firewall and VPS firewall.
Notes
- The database runs in a separate MySQL container by default.
- Uploaded files are stored in a named Docker volume.
- If you want HTTPS, add TLS termination to Nginx or put a separate certbot setup in front of it.