Fixes: 1) Update Celery worker configuration in `worker-entrypoint.sh` to optimize worker pool and task limits; Extra: Refactor `docker-compose.yml` and scripts for improved service management.
49 lines
No EOL
1.5 KiB
Text
49 lines
No EOL
1.5 KiB
Text
# syntax=docker/dockerfile:1
|
|
FROM python:3.12-bookworm
|
|
LABEL authors="fureunoir"
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
LANG=C.UTF-8 \
|
|
DEBIAN_FRONTEND=noninteractive \
|
|
PATH="/root/.local/bin:$PATH"
|
|
|
|
WORKDIR /app
|
|
|
|
RUN set -eux; \
|
|
sed -i 's|https://deb.debian.org/debian|https://ftp.uk.debian.org/debian|g' /etc/apt/sources.list.d/debian.sources; \
|
|
apt-get update; \
|
|
apt-get install -y --no-install-recommends wget gnupg; \
|
|
wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -; \
|
|
echo "deb http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" \
|
|
> /etc/apt/sources.list.d/pgdg.list; \
|
|
apt-get update; \
|
|
apt-get install -y --no-install-recommends --fix-missing \
|
|
build-essential \
|
|
libpq-dev \
|
|
gettext \
|
|
libgettextpo-dev \
|
|
graphviz-dev \
|
|
libgts-dev \
|
|
libpq5 \
|
|
graphviz \
|
|
binutils \
|
|
libproj-dev \
|
|
postgresql-client-17 \
|
|
gdal-bin; \
|
|
rm -rf /var/lib/apt/lists/*; \
|
|
pip install --upgrade pip; \
|
|
curl -sSL https://install.python-poetry.org | python3
|
|
|
|
COPY pyproject.toml pyproject.toml
|
|
COPY poetry.lock poetry.lock
|
|
|
|
RUN poetry config virtualenvs.create false
|
|
RUN poetry install --extras="worker openai" --no-interaction --no-ansi
|
|
|
|
COPY ./scripts/Docker/stock-updater-entrypoint.sh /usr/local/bin/stock-updater-entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/stock-updater-entrypoint.sh
|
|
|
|
COPY . .
|
|
|
|
ENTRYPOINT ["stock-updater-entrypoint.sh"] |