Skip to content

fuyu-quant/fastapi-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-docker

FastAPI dokcer

Contents

FastAPI

起動方法

  • コンテナ立ち上げ時に起動 以下のコードをDockerfileに追記
COPY main.py /root
ENTRYPOINT ["uvicorn", "main:app", "--reload", "--host", "127.0.0.1", "--port", "8040"]
  • コマンドによる起動
docker-compose exec fastapi bash
cd src
uvicorn main:app --reload --host 0.0.0.0 --port 8040

Automatic Document Generation

Reference