-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set root-path from uvicorn #221
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,8 @@ RUN --mount=type=cache,target=/root/.cache \ | |
ENV APP_HOST=0.0.0.0 | ||
ENV APP_PORT=81 | ||
|
||
CMD uvicorn pcstac.main:app --host ${APP_HOST} --port ${APP_PORT} --log-level info | ||
# This value should match that which is used as the root_path in FastAPI, which | ||
# is typically set via the APP_ROOT_PATH environment variable. | ||
ENV APP_ROOT_PATH="" | ||
|
||
CMD uvicorn pcstac.main:app --host ${APP_HOST} --port ${APP_PORT} --root-path ${APP_ROOT_PATH} --log-level info | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, this fixes the issue in the deployed environment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just confirming the behavior here: The "default" And is the default of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In practice, I didn't want to give it a default value. Locally and on PCT, it's |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
FROM pc-apis-stac | ||
|
||
|
||
RUN --mount=type=cache,target=/root/.cache \ | ||
--mount=type=bind,source=requirements-dev.txt,target=requirements-dev.txt \ | ||
pip install -r requirements-dev.txt | ||
|
||
RUN --mount=type=cache,target=/root/.cache \ | ||
pip install -e ./pccommon[dev] -e ./pcstac | ||
pip install --no-deps -e ./pccommon[dev] -e ./pcstac | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensures that pcstac dependencies aren't overwritten by pccommon |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""FastAPI application using PGStac.""" | ||
|
||
import logging | ||
import os | ||
from typing import Any, Dict | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
extra_reqs = { | ||
"server": [ | ||
"uvicorn[standard]>=0.17.0,<0.18.0", | ||
"uvicorn[standard]==0.30.1", | ||
], | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
black==22.3.0 | ||
black==24.4.2 | ||
flake8==3.8.4 | ||
isort==5.9.2 | ||
mypy==1.8.0 | ||
openapi-spec-validator==0.3.0 | ||
cachetools<=4.2. | ||
pytest==7.* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a dev dependency and conflicted with installed dependencies on server images. |
||
pytest-asyncio==0.18.* | ||
httpx>=0.22.0 | ||
json-schema<4.18.0 # https://github.com/stac-utils/pystac/issues/1186 | ||
|
||
pip-tools | ||
# Mypy types | ||
types-python-dateutil | ||
types-cachetools | ||
types-python-dateutil | ||
types-redis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally, this is the actual fix to the issue.