File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11## simple usage on linux:
22``` bash
3- docker run --rm -it -p 8000:8000 -v ${PWD} :/app itaru2622/fastapi:bookworm
3+ make start
44
5+ # or
6+
7+ docker run --rm -it -p 8000:8000 -v ${PWD} :${PWD} -w ${PWD} itaru2622/fastapi:bookworm
58# the above cmd start docker container with:
6- apt install -y /app /requirements-apt.txt
7- pip3 install -r /app /requirements.txt
9+ apt install -y ${PWD} /requirements-apt.txt
10+ pip3 install -r ${PWD} /requirements.txt
811uvicorn main:app
912```
1013
14+ ## test and play with embeded sample(samples/3catchall) for fastAPI
15+
16+ ``` bash
17+ make test
18+ # then, access http://localhost:8000/docs for swagger UI
19+ ```
20+
1121## other usage on linux:
1222you can:
1323- set any uvicorn options by opts environment variable.
@@ -29,5 +39,7 @@ uvicorn ${opts} ${app}
2939
3040## build docker image
3141``` bash
42+ make build
43+ # or
3244docker build --build-arg base=python:3-bookworm --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} -t itaru2622/fastapi:bookworm .
3345```
You can’t perform that action at this time.
0 commit comments