feat: add WeasyPrint installation to Dockerfile and create startup scripts for Celery and FastAPI
This commit is contained in:
@@ -20,9 +20,12 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||||||
|
|
||||||
# Then, use a final image without uv
|
# Then, use a final image without uv
|
||||||
FROM python:3.11-slim-bookworm
|
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`
|
RUN apt-get update && \
|
||||||
# will fail.
|
apt-get install -y weasyprint && \
|
||||||
|
apt clean && \
|
||||||
|
rm -rf /var/cache/apt/*
|
||||||
|
|
||||||
|
|
||||||
# Copy the application from the builder
|
# Copy the application from the builder
|
||||||
COPY --from=builder --chown=app:app /app /app
|
COPY --from=builder --chown=app:app /app /app
|
||||||
|
|||||||
1
start_celery.sh
Normal file
1
start_celery.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
celery -A background.celery_app worker --loglevel=info
|
||||||
1
start_fastapi.sh
Normal file
1
start_fastapi.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
gunicorn main:app -w 4
|
||||||
Reference in New Issue
Block a user