From 1ad84ecff14cc63bc443be87b3100c952a6ac18b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 22 Nov 2022 15:52:50 +0900 Subject: [PATCH] changes --- deployment/frogress/Dockerfile | 5 ++-- deployment/frogress/entrypoint.sh | 2 +- poetry.lock | 40 ++++++++++++++++++++++++++++++- pyproject.toml | 4 ++-- 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/deployment/frogress/Dockerfile b/deployment/frogress/Dockerfile index e42d03d..4355a8e 100644 --- a/deployment/frogress/Dockerfile +++ b/deployment/frogress/Dockerfile @@ -1,8 +1,8 @@ -FROM python:3.10-slim +FROM python:3.11-slim RUN apt-get update && apt-get install -y curl netcat -ARG POETRY_VERSION=1.1.15 +ARG POETRY_VERSION=1.2.2 ENV POETRY_VERSION=${POETRY_VERSION} RUN curl -sSL https://install.python-poetry.org | \ POETRY_VERSION=${POETRY_VERSION} POETRY_HOME=/etc/poetry python - @@ -27,6 +27,7 @@ ENV PATH="$PATH:/etc/poetry/bin" RUN poetry install COPY .env /frogress +COPY .env.local /frogress COPY ./deployment/frogress/entrypoint.sh /entrypoint.sh diff --git a/deployment/frogress/entrypoint.sh b/deployment/frogress/entrypoint.sh index 572d1e7..8556094 100755 --- a/deployment/frogress/entrypoint.sh +++ b/deployment/frogress/entrypoint.sh @@ -13,4 +13,4 @@ done poetry run python manage.py migrate -poetry run python manage.py runserver ${BE_HOST}:${BE_PORT} +poetry run gunicorn frogress.wsgi diff --git a/poetry.lock b/poetry.lock index c79ecf3..c5ed8b4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -213,6 +213,23 @@ typing-extensions = ">=3.10.0" [package.extras] compatible-mypy = ["mypy (>=0.950,<0.970)"] +[[package]] +name = "gunicorn" +version = "20.1.0" +description = "WSGI HTTP Server for UNIX" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +setuptools = ">=3.0" + +[package.extras] +eventlet = ["eventlet (>=0.24.1)"] +gevent = ["gevent (>=1.4.0)"] +setproctitle = ["setproctitle"] +tornado = ["tornado (>=0.2)"] + [[package]] name = "idna" version = "3.4" @@ -334,6 +351,19 @@ urllib3 = ">=1.21.1,<1.27" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "setuptools" +version = "65.6.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + [[package]] name = "six" version = "1.16.0" @@ -441,7 +471,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "d208d3e450bea50fab81a624699db8f11b30c401f56cc1f3c53f3e10dfbc0f51" +content-hash = "8f9122a4341075b9485fb65a591720f0521d41c43aa4b09073676a69680e1205" [metadata.files] asgiref = [ @@ -541,6 +571,10 @@ djangorestframework-stubs = [ {file = "djangorestframework-stubs-1.7.0.tar.gz", hash = "sha256:6e8a80a0716d8af02aa387dae47f8ef97b6c0efdf159d83a5918d582f8b1ea07"}, {file = "djangorestframework_stubs-1.7.0-py3-none-any.whl", hash = "sha256:3ac1447fc87f68fe7d8622d4725b5cef820bcc17918f36c7da3f667363fb7a43"}, ] +gunicorn = [ + {file = "gunicorn-20.1.0-py3-none-any.whl", hash = "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e"}, + {file = "gunicorn-20.1.0.tar.gz", hash = "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"}, +] idna = [ {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, @@ -644,6 +678,10 @@ requests = [ {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, ] +setuptools = [ + {file = "setuptools-65.6.0-py3-none-any.whl", hash = "sha256:6211d2f5eddad8757bd0484923ca7c0a6302ebc4ab32ea5e94357176e0ca0840"}, + {file = "setuptools-65.6.0.tar.gz", hash = "sha256:d1eebf881c6114e51df1664bc2c9133d022f78d12d5f4f665b9191f084e2862d"}, +] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, diff --git a/pyproject.toml b/pyproject.toml index 78bf391..0d4011f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,16 +9,16 @@ license = "MIT" python = "^3.8" Django = "^4.1" djangorestframework = "^3.13.1" -# psycopg2-binary = "^2.9.3" django-nested-admin = "^3.4.0" django-environ = "^0.9.0" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] black = "^22.6.0" mypy = "^0.971" django-stubs = "^1.12.0" djangorestframework-stubs = "^1.7.0" django-stubs-ext = "^0.5.0" +gunicorn = "^20.1.0" [build-system] requires = ["poetry-core>=1.0.0"]