This is a quickstart of FastAPI.
- Python 3.10
- Use peewee as ORM.
- Open config file and set up your own MySQL config.
-
Install dependencies
$ pip install -r requirements.txt
-
Run server
$ python server.py
-
Build docker image
$ ./deploy.sh [env] [tag]
-
Run docker container
$ docker run -d -p 8000:8000 --name fastapi-quickstart fastapi-quickstart:[tag] server.py
-
Check logs
$ docker logs -f fastapi-quickstart
Open http://127.0.0.1:8000/fastapi/docs to check the API doc.