Skip to content

Commit f345d92

Browse files
author
github-actions
committed
chore: include api deps and postal in docker image
1 parent 51093eb commit f345d92

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ WORKDIR /app
2020
# Allow overriding install ref (defaults to main)
2121
ARG 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)
2731
COPY . /app

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

6565
docker-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
7070
clean:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ make docker-shell
4949
Run the optional API (FastAPI) on port 8000:
5050
```bash
5151
make 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
```

0 commit comments

Comments
 (0)