haystack/docker/Dockerfile.api
Mayank Jobanputra fa17f0973e
chore: increased timeout for loading pipelines through API (#3977)
* increased timeout

* Added comment for users to increase timeout while using docker compose file

* changed the comment with appropriate msg

* changed the comment indent

* changed the indent again
2023-01-30 11:30:47 +01:00

26 lines
872 B
Docker

ARG base_image_tag
ARG base_image
FROM ${base_image}:${base_image_tag}
ENV SERVICE_NAME="gunicorn-service"
RUN addgroup --gid 1001 $SERVICE_NAME && \
adduser --gid 1001 --uid 1001 --shell /bin/false --disabled-password $SERVICE_NAME && \
mkdir -p /var/log/$SERVICE_NAME && \
chown $SERVICE_NAME:$SERVICE_NAME /var/log/$SERVICE_NAME
# Create a folder for the /file-upload API endpoint with write permissions for the service user only
RUN mkdir -p /opt/file-upload && chown $SERVICE_NAME:$SERVICE_NAME /opt/file-upload && chmod 600 /opt/file-upload
# Tell rest_api which folder to use for uploads
ENV FILE_UPLOAD_PATH="/opt/file-upload"
ENV TIKA_LOG_PATH="/var/log/$SERVICE_NAME/"
EXPOSE 8000
USER $SERVICE_NAME
CMD ["gunicorn", "rest_api.application:app", "-b", "0.0.0.0", "-k", "uvicorn.workers.UvicornWorker", "--workers", "1", "--timeout", "1000"]