File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,8 +20,12 @@ WORKDIR /app
2020# Allow overriding install ref (defaults to main)
2121ARG RYANDATA_ADDR_UTILS_REF=main
2222
23- # Install the package from git ref
24- RUN pip install --no-cache-dir "git+https://github.com/Abstract-Data/RyanData-Address-Utils.git@${RYANDATA_ADDR_UTILS_REF}"
23+ # Install the package from git ref plus API deps
24+ RUN pip install --no-cache-dir \
25+ "git+https://github.com/Abstract-Data/RyanData-Address-Utils.git@${RYANDATA_ADDR_UTILS_REF}" \
26+ fastapi \
27+ "uvicorn[standard]" \
28+ postal
2529
2630# Optional: copy source for local development/mounting (no-op unless mounted)
2731COPY . /app
Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ docker-test:
6363 python -c " from ryandata_address_utils import parse; print(parse('123 Main St, Austin TX 78749').to_dict())"
6464
6565docker-run-api :
66- docker run --rm -it - p 8000:8000 $(DOCKER_IMAGE ) :$(DOCKER_TAG ) \
67- python -m ryandata_address_utils.api
66+ docker run --rm -p 8000:8000 $(DOCKER_IMAGE ) :$(DOCKER_TAG ) \
67+ uvicorn ryandata_address_utils.api:app --host 0.0.0.0 --port 8000
6868
6969# Clean up
7070clean :
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ make docker-shell
4949Run the optional API (FastAPI) on port 8000:
5050``` bash
5151make docker-run-api
52- # Then call: curl "http://localhost:8000/parse?address=123%20Main%20St,%20Austin%20TX%2078749"
52+ # Then call:
53+ # curl "http://localhost:8000/parse?address=123%20Main%20St,%20Austin%20TX%2078749"
5354# International (if libpostal available in image):
5455# curl "http://localhost:8000/parse_international?address=10%20Downing%20St,%20London"
5556```
You can’t perform that action at this time.
0 commit comments