This repository contains the code that can be used for local development using the docker. Below are the tools configured with this repo -
- Adminer - Can be used to browse the database in browser
- FastAPI - Basic setup required to start the FastApi project
- Mailpit - An email testing tool for local development
- MySQL - MySQL server for local development
- Clone this repository in your local machine by typing
git clone git@github.com:Describly/fastapi-starter-kit.git. - Open the Terminal and navigate to the project folder.
- Run
docker volume create describly_mysql_datato create a docker volue in you machine. Required to persist the mysql data. - Below will be your mysql connection details
MYSQL_HOST=mysql
MYSQL_USER=root
MYSQL_PASSWORD=Describly&123
MYSQL_DB=fastapi
MYSQL_PORT=3306You do not need to change anything here, but if you would like to change the username, password or database name, you can modify it at this point in the .env file attached to this project.
- We can start building our projects by running
docker-compose build - One build is done, run
docker-compose upto start the services. Leave this terminal open to check the logs. - To stop the services you can press
Ctrl + C- (Control + C)
- FastAPI Application Status http://localhost:8000
- API Documentation http://localhost:8000/docs
- Database Access http://localhost:8080 - use the above detail to login.
- Mailpit http://localhost:8025