update-author_cache

This commit is contained in:
2024-02-25 21:16:34 +03:00
parent 314c54969b
commit f596a9bf2c
4 changed files with 33 additions and 18 deletions

View File

@@ -1,12 +1,25 @@
FROM python:alpine
# Update package lists and install necessary dependencies
RUN apk update && \
apk add --no-cache build-base icu-data-full curl python3-dev musl-dev postgresql-dev postgresql-client && \
curl -sSL https://install.python-poetry.org | python
# Set working directory
WORKDIR /app
# Copy only the pyproject.toml file initially
COPY pyproject.toml /app/
# Install poetry and dependencies
RUN pip install poetry && \
poetry config virtualenvs.create false && \
poetry install --no-root --only main
# Copy the rest of the application
COPY . /app
RUN apk update && apk add --no-cache build-base icu-data-full curl python3-dev musl-dev postgresql-dev postgresql-client
RUN curl -sSL https://install.python-poetry.org | python
ENV PATH="${PATH}:/root/.local/bin"
RUN poetry config virtualenvs.create false && poetry install --only main
# Expose the port
EXPOSE 8000
CMD ["python", "server.py"]