Skip to content

Commit 6458ded

Browse files
committed
update: README.md
1 parent d051362 commit 6458ded

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
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
811
uvicorn 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:
1222
you 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
3244
docker build --build-arg base=python:3-bookworm --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} -t itaru2622/fastapi:bookworm .
3345
```

0 commit comments

Comments
 (0)