librechat / Dockerfile
martynka's picture
Update Dockerfile
78d03ad verified
raw
history blame
754 Bytes
# Pull the base image
FROM ghcr.io/danny-avila/librechat-dev:latest
USER root
# Set environment variables
ENV HOST=0.0.0.0
ENV PORT=7860
ENV SESSION_EXPIRY=900000
ENV REFRESH_TOKEN_EXPIRY=604800000
ENV SEARCH=false
ENV MEILI_NO_ANALYTICS=true
ENV MEILI_HOST=https://librechat-meilisearch.hf.space
# Create necessary directories and give write permission
RUN mkdir -p /app/uploads/temp /app/client/public/images/temp /app/api/logs /app/data &&\
chmod -R 777 /app/uploads/temp /app/client/public/images /app/api/logs /app/data
# Install dependencies
RUN cd /app/api && npm install
# Copy entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Run backend securely using runtime secret
CMD ["/app/entrypoint.sh"]