chat_back/docker/Dockerfile_celery
2024-08-19 21:18:53 +04:00

26 lines
552 B
Text

FROM quay.io/urec56/python312
RUN addgroup --system app && adduser --system --group app
ENV APP_HOME=/home/app
WORKDIR $APP_HOME
RUN apt-get update \
&& apt-get -y install curl gcc libpq-dev \
&& apt-get clean
COPY requirements.txt .
RUN pip config set global.trusted-host "pypi.python.org pypi.org files.pythonhosted.org" && \
pip install --upgrade pip setuptools \
pip install -r requirements.txt
COPY . .
RUN chown -R app:app $APP_HOME
USER app
CMD ["celery", "-A", "app.tasks.celery:celery", "worker", "--loglevel=INFO"]