-
Notifications
You must be signed in to change notification settings - Fork 33
Pv/create docker image for deploy #79
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
Conversation
| FROM python:3.8-slim | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get -y upgrade && \ |
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.
only dev dependencies need buildessitials and git, so don't install.
|
|
||
| COPY . /app | ||
|
|
||
| RUN pip install --no-cache-dir ./stac_fastapi/elasticsearch[server] |
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.
only install server deps, not dev also
Dockerfile.deploy
Outdated
|
|
||
| EXPOSE 8080 | ||
|
|
||
| CMD ["uvicorn", "stac_fastapi.elasticsearch.app:app", "--host", "0.0.0.0", "--port", "8080"] No newline at end of file |
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.
actually run the app
| run: | ||
| docker run -it -p 8080:8080 \ | ||
| -e ENVIRONMENT=local \ | ||
| -e ES_HOST=docker.for.mac.localhost \ |
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.
this will have to be updated for non-mac. tbd.
| "pre-commit", | ||
| "requests", | ||
| "ciso8601", | ||
| "overrides", |
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.
this should have been a core dep rather than an extra. We never ran it without also installing the dev deps, so it didn't surface.
| resp_json = resp.json() | ||
| assert list(resp_json["features"][0]["properties"]) == ["datetime"] | ||
|
|
||
| txn_client.delete_item(item["id"], item["collection"], request=MockRequest) |
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.
this method doesn't use the request, so removing
Related Issue(s):
Description:
PR Checklist:
pre-commit run --all-files)make test)make docs)