-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from lsst-dm/tickets/DM-45456
DM-45456 Move from Flask to FastAPI +424-488
- Loading branch information
Showing
5 changed files
with
458 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
FROM python:3.11 | ||
RUN pip install flask gunicorn sqlalchemy psycopg2 | ||
RUN pip install fastapi safir astropy uvicorn gunicorn sqlalchemy psycopg2 | ||
WORKDIR / | ||
COPY python/lsst/consdb/__init__.py python/lsst/consdb/pqserver.py python/lsst/consdb/utils.py /consdb-pq/ | ||
COPY python/lsst/consdb/__init__.py python/lsst/consdb/pqserver.py python/lsst/consdb/utils.py /consdb_pq/ | ||
# Environment variables that must be set: | ||
# DB_HOST DB_PASS DB_USER DB_NAME or POSTGRES_URL | ||
|
||
# Expose the port. | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT [ "gunicorn", "-b", "0.0.0.0:8080", "-w", "2", "consdb-pq.pqserver:app" ] | ||
|
||
ENTRYPOINT [ "uvicorn", "consdb_pq.pqserver:app", "--host", "0.0.0.0", "--port", "8080" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.