mirror of
https://github.com/mruwnik/memory.git
synced 2025-06-08 13:24:41 +02:00
28 lines
677 B
Docker
28 lines
677 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy requirements files and setup
|
|
COPY requirements-*.txt ./
|
|
COPY setup.py ./
|
|
COPY src/ ./src/
|
|
|
|
# Install dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
libpq-dev gcc && \
|
|
pip install -e ".[workers]" && \
|
|
apt-get purge -y gcc && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create and copy entrypoint script
|
|
COPY docker/workers/entry.sh ./entry.sh
|
|
RUN chmod +x entry.sh
|
|
|
|
# Create user and set permissions
|
|
RUN useradd -m kb && chown -R kb /app
|
|
USER kb
|
|
|
|
# Default queues to process
|
|
ENV QUEUES="medium_embed,photo_embed,low_ocr,git_summary,rss,docs,email"
|
|
ENV PYTHONPATH="/app"
|
|
|
|
ENTRYPOINT ["./entry.sh"] |