Skip to content

compose docker that run mysql and fastapi that can insert and select values to database via browser

Notifications You must be signed in to change notification settings

brachya/docker_mysql_fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Title

A docker compose that has two containers:

  1. mysql container running on inner 3306 port and outer 3310 port.
  2. python 3.9 container that has fastapi and uvicorn web server, running on 80 inner port and 80 outer port.

Instructions

Deployment

To deploy this project you must have docker and run this command from the main folder

  docker compose up -d

API Reference

Get 10 top values by key

  GET 127.0.0.1/logs/{value}
Parameter Type Description
value string Required. key to search

GET example

Add new item

  POST 127.0.0.1/add_log/
Parameter Type Description
Log JSON { "log_msg" :"string"}

POST example

Documentation

  GET 127.0.0.1/docs/
Description
BUILT IN docs from fastapi

docs

Libraries Used

Authors

About

compose docker that run mysql and fastapi that can insert and select values to database via browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published