Skip to content

Commit

Permalink
Merge pull request #23 from gardenlinux/container-hypercorn
Browse files Browse the repository at this point in the history
Use Hypercorn as production ASGI server
  • Loading branch information
waldiTM authored Dec 8, 2023
2 parents 6b570cc + ad23bb0 commit 507cfd3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ FROM docker.io/library/debian:trixie-slim
# XXX: Debian Experimental required for python3-sqlalchemy (>= 2)
RUN sed -i -e 's/Suites: trixie trixie-updates/\0 experimental/' /etc/apt/sources.list.d/debian.sources
RUN apt-get update && \
apt-get upgrade -y --no-install-recommends python3-asyncpg python3-pip python3-poetry-core python3-quart python3-requests python3-sqlalchemy/experimental
apt-get upgrade -y --no-install-recommends python3-asyncpg python3-hypercorn python3-pip python3-poetry-core python3-quart python3-requests python3-sqlalchemy/experimental
COPY . /usr/local/src
RUN pip install --break-system-packages --no-deps --editable /usr/local/src

# TODO: The Quart internal server is only for development
CMD ["quart", "--app=glvd.web", "run", "--host=::"]
ENTRYPOINT ["hypercorn", "glvd.web.app:app"]
CMD []
6 changes: 6 additions & 0 deletions src/glvd/web/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: MIT

from . import create_app


app = create_app()

0 comments on commit 507cfd3

Please sign in to comment.