doc-maker / Dockerfile
pvanand's picture
Update Dockerfile
bc521d2 verified
raw
history blame
795 Bytes
# Use the official Python 3.10.9 image as the base
FROM python:3.10.9
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Create the .crawl4ai directory with correct permissions
RUN mkdir /.crawl4ai && chmod 777 /.crawl4ai
# Copy the current directory contents into the container
COPY . .
# Ensure the correct permissions for the application directory
RUN chmod -R 755 /app
# Expose the port the app runs on
EXPOSE 8000
# Set environment variable to use the created directory
ENV CRAWL4AI_DB_PATH=/.crawl4ai
# Command to run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]