mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-09 11:47:14 +02:00
feat(bookwyrm): production-ready runtime + Redis wiring
- Dockerfile: build & install gunicorn wheels - compose: run initdb before start; use `python -m gunicorn` - env: add POSTGRES_* and BookWyrm Redis aliases (BROKER/ACTIVITY/CACHE) + CACHE_URL - vars: add cache URL, DB indices, and URL aliases for Redis Ref: https://chatgpt.com/share/68b7492b-3200-800f-80c4-295bc3233d68
This commit is contained in:
@@ -12,7 +12,8 @@ RUN git clone --depth=1 --branch "{{ BOOKWYRM_VERSION }}" https://github.com/boo
|
||||
|
||||
# Pre-install Python deps to a wheelhouse for faster final image
|
||||
RUN pip install --upgrade pip \
|
||||
&& pip wheel --wheel-dir /wheels -r requirements.txt
|
||||
&& pip wheel --wheel-dir /wheels -r requirements.txt \
|
||||
&& pip wheel --wheel-dir /wheels gunicorn
|
||||
|
||||
FROM python:3.11-bookworm
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
@@ -28,6 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libjpeg62-turbo zlib1g libxml2 libxslt1.1 libffi8 libmagic1 \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& pip install --no-cache-dir --no-index --find-links=/wheels -r /app/requirements.txt \
|
||||
&& pip install --no-cache-dir --no-index --find-links=/wheels gunicorn \
|
||||
&& adduser --disabled-password --gecos '' bookwyrm \
|
||||
&& mkdir -p /app/data /app/media \
|
||||
&& chown -R bookwyrm:bookwyrm /app
|
||||
|
Reference in New Issue
Block a user