feat: add WeasyPrint installation to Dockerfile and create startup scripts for Celery and FastAPI

This commit is contained in:
2025-09-02 04:58:50 +03:00
parent 03dd3f9db4
commit e8c776ac66
3 changed files with 8 additions and 3 deletions

View File

@@ -20,9 +20,12 @@ RUN --mount=type=cache,target=/root/.cache/uv \
# Then, use a final image without uv
FROM python:3.11-slim-bookworm
# It is important to use the image that matches the builder, as the path to the
# Python executable must be the same, e.g., using `python:3.11-slim-bookworm`
# will fail.
RUN apt-get update && \
apt-get install -y weasyprint && \
apt clean && \
rm -rf /var/cache/apt/*
# Copy the application from the builder
COPY --from=builder --chown=app:app /app /app

1
start_celery.sh Normal file
View File

@@ -0,0 +1 @@
celery -A background.celery_app worker --loglevel=info

1
start_fastapi.sh Normal file
View File

@@ -0,0 +1 @@
gunicorn main:app -w 4