You've already forked favicon-api-async
25.09.16 update
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -1,36 +1,19 @@
|
||||
FROM python:3.13-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.txt
|
||||
|
||||
RUN pip wheel --no-cache-dir --wheel-dir /app/wheels -r requirements.txt
|
||||
COPY . .
|
||||
RUN python -m compileall -b . && find . -name "*.py" -delete
|
||||
|
||||
RUN python -m compileall -b .
|
||||
|
||||
FROM python:3.13-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/wheels /wheels
|
||||
COPY --from=builder /app/requirements.txt .
|
||||
RUN pip install --no-cache /wheels/*
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
RUN find . -type d -name "__pycache__" | while read -r dir; do \
|
||||
module_dir=$(dirname "$dir"); \
|
||||
mv "$dir"/*.pyc "$module_dir/"; \
|
||||
rmdir "$dir"; \
|
||||
done
|
||||
|
||||
RUN find . -name "*.py" -delete
|
||||
RUN pip install --no-cache /app/wheels/* && chmod +x /app/entrypoint.sh && rm -rf /wheels /app/wheels
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
VOLUME ["/app/data", "/app/conf", "/app/logs"]
|
||||
|
||||
VOLUME ["/app/data", "/app/logs"]
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
||||
CMD ["gunicorn", "-c", "conf/gunicorn.conf.py", "main:app"]
|
||||
|
||||
Reference in New Issue
Block a user