-
-
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.
fix dockerfile, set dotenv as a dev dependency
- Loading branch information
Showing
5 changed files
with
38 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
FROM python:3.10 | ||
|
||
# Configure Poetry | ||
ENV POETRY_VERSION=1.2.1 | ||
ENV POETRY_HOME=/opt/poetry | ||
ENV POETRY_VENV=/opt/poetry-venv | ||
ENV POETRY_CACHE_DIR=/opt/.cache | ||
|
||
# Install poetry | ||
RUN python3 -m venv $POETRY_VENV \ | ||
&& $POETRY_VENV/bin/pip install -U pip setuptools \ | ||
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION} | ||
|
||
# add `poetry` to PATH | ||
ENV PATH="${PATH}:${POETRY_VENV}/bin" | ||
|
||
WORKDIR /code | ||
COPY ./requirements.txt /code/requirements.txt | ||
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | ||
COPY ./app /code/app | ||
|
||
CMD ["uvicorn", "app.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "80"] | ||
# Install dependencies | ||
COPY poetry.lock pyproject.toml ./ | ||
RUN poetry install --no-interaction --no-cache --witout dev | ||
|
||
|
||
# Run app | ||
COPY ./app /code/app | ||
CMD ["poetry", "run", "uvicorn", "app.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "80"] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -6,15 +6,13 @@ version = "0.1.0" | |
description = "" | ||
authors = ["Your Name <[email protected]>"] | ||
readme = "README.md" | ||
packages = [{include = "academyruins_api"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
fastapi = {extras = ["all"], version = "^0.85.0"} | ||
logging = "^0.4.9.6" | ||
APScheduler = "^3.9.1" | ||
boto3 = "^1.24.84" | ||
python-dotenv = "^0.21.0" | ||
pydantic = "^1.10.2" | ||
requests = "^2.28.1" | ||
SQLAlchemy = "^1.4.41" | ||
|
@@ -25,6 +23,9 @@ beautifulsoup4 = "^4.11.1" | |
thefuzz = {extras = ["speedup"], version = "^0.19.0"} | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
python-dotenv = "^0.21.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |