Updates Dependencies, Creates Dockerfile and Formats Code

This commit is contained in:
2023-08-23 09:35:17 -03:00
parent f3e77889a2
commit 4d0ad4b104
8 changed files with 98 additions and 39 deletions

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM python:3.10
LABEL authors="hideyoshi"
# Configure Poetry
ENV POETRY_VERSION=1.5.1
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
ENV POETRY_CACHE_DIR=/opt/.cache
# Install poetry separated from system interpreter
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 /app
# Install dependencies
COPY . .
RUN poetry install
EXPOSE 5000-9000
# Run your app
CMD [ "poetry", "run", "python", "-m", "storage_service" ]