From e0ff81c665fb96587ac3c085514f546bde4b4f4c Mon Sep 17 00:00:00 2001 From: Kyle Lawlor-Bagcal Date: Wed, 27 Sep 2023 20:11:20 -0400 Subject: [PATCH] fix: poetry dependency installation issue --- docker/indexer.Dockerfile | 9 +-------- docker/scripts/indexer_start.sh | 2 +- poetry.lock | 16 +++++++++++++++- pyproject.toml | 1 + 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/docker/indexer.Dockerfile b/docker/indexer.Dockerfile index be73ab9..6908d98 100644 --- a/docker/indexer.Dockerfile +++ b/docker/indexer.Dockerfile @@ -2,7 +2,7 @@ FROM python:3.9 # Install dependencies RUN apt-get update -RUN apt-get install libpq-dev postgresql-client -y +RUN apt-get install libpq-dev postgresql-client python3-poetry -y # Set working directory WORKDIR /home/indexer @@ -10,12 +10,5 @@ WORKDIR /home/indexer # Copy source code COPY . . -# Install python dependencies -RUN pip install poetry -RUN pip install load_dotenv -RUN pip install psycopg2 -RUN pip install sentry_sdk -RUN pip install tenacity - # Install indexer RUN poetry install diff --git a/docker/scripts/indexer_start.sh b/docker/scripts/indexer_start.sh index 8cf1da7..e263974 100755 --- a/docker/scripts/indexer_start.sh +++ b/docker/scripts/indexer_start.sh @@ -15,4 +15,4 @@ if [ ! -e $INDEXER_INITIALIZED ]; then fi # start indexer -python main.py +poetry run python main.py diff --git a/poetry.lock b/poetry.lock index 56e3c16..31c7ef1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -106,6 +106,20 @@ files = [ {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, ] +[[package]] +name = "load-dotenv" +version = "0.1.0" +description = "Automatically and implicitly load environment variables from .env file" +optional = false +python-versions = "*" +files = [ + {file = "load-dotenv-0.1.0.tar.gz", hash = "sha256:bbe5f40072d4a61eadca66de6c222df5a2d935d6d41b703be1ff75396f635145"}, + {file = "load_dotenv-0.1.0-py3-none-any.whl", hash = "sha256:614803f720153fb8a5f97124a72aaa3930a67aa5547cbe8603d01ea7f9ac1adf"}, +] + +[package.dependencies] +python-dotenv = "*" + [[package]] name = "psycopg2-binary" version = "2.9.6" @@ -287,4 +301,4 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f2b3e956651acae4e387a5b4a6a3bb5df1809e16368b79eed504446ad368810f" +content-hash = "6208696466586463703b66277674a3492ac10c5252a47064963fbe59ffe417a5" diff --git a/pyproject.toml b/pyproject.toml index bcaaa21..5a3d888 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ python-dotenv = "^0.18.0" psycopg2-binary = "^2.9.6" sentry-sdk = "^1.24.0" tenacity = "^8.2.2" +load-dotenv = "^0.1.0" [tool.poetry.dev-dependencies]