From ef889448bdd365a688410b55a5c99d8be717e59a Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Fri, 23 May 2025 18:06:04 +0200 Subject: [PATCH] update files --- Dockerfile | 10 ++++++---- pyproject.toml | 5 +++++ uv.lock | 23 +++++++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 005db73..0771cec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,13 @@ WORKDIR /app # Copy the application files into the container COPY . /app -# Install dependencies -RUN pip install --no-cache-dir -r requirements.txt +# Install Poetry for dependency management +RUN pip install --no-cache-dir uv +RUN uv sync --locked --all-extras --dev --deploy + # Expose the port the app runs on EXPOSE 5001 -# Set the default command to run the application -CMD ["python", "src/app.py"] +# Set the default command to run the application using uvicorn +CMD ["uv", "run", "uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "5001"] diff --git a/pyproject.toml b/pyproject.toml index 02eba76..3da0438 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,3 +23,8 @@ dependencies = [ [[tool.uv.index]] name = "gitea" url = "https://git.theprivateserver.de/api/packages/KomSuite/pypi/simple/" + +[dependency-groups] +deploy = [ + "uvicorn>=0.34.2", +] diff --git a/uv.lock b/uv.lock index 5b27ed8..354a6b5 100644 --- a/uv.lock +++ b/uv.lock @@ -307,6 +307,12 @@ dependencies = [ { name = "komsuite-nyaapy" }, { name = "limit" }, { name = "quart" }, + { name = "uvicorn" }, +] + +[package.dev-dependencies] +deploy = [ + { name = "uvicorn" }, ] [package.metadata] @@ -322,8 +328,12 @@ requires-dist = [ { name = "komsuite-nyaapy", specifier = ">=0.1.0" }, { name = "limit", specifier = ">=0.2.3" }, { name = "quart", specifier = ">=0.20.0" }, + { name = "uvicorn", specifier = ">=0.34.2" }, ] +[package.metadata.requires-dev] +deploy = [{ name = "uvicorn", specifier = ">=0.34.2" }] + [[package]] name = "komsuite-nyaapy" version = "0.1.0" @@ -534,6 +544,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl", hash = "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813", size = 128680, upload-time = "2025-04-10T15:23:37.377Z" }, ] +[[package]] +name = "uvicorn" +version = "0.34.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a6/ae/9bbb19b9e1c450cf9ecaef06463e40234d98d95bf572fab11b4f19ae5ded/uvicorn-0.34.2.tar.gz", hash = "sha256:0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328", size = 76815, upload-time = "2025-04-19T06:02:50.101Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b1/4b/4cef6ce21a2aaca9d852a6e84ef4f135d99fcd74fa75105e2fc0c8308acd/uvicorn-0.34.2-py3-none-any.whl", hash = "sha256:deb49af569084536d269fe0a6d67e3754f104cf03aba7c11c40f01aadf33c403", size = 62483, upload-time = "2025-04-19T06:02:48.42Z" }, +] + [[package]] name = "werkzeug" version = "3.1.3"