hadt-api / Dockerfile
GitHub Actions
Sync API from main repo
a1eb3aa
raw
history blame contribute delete
537 Bytes
# Use a lightweight Python image
FROM python:3.10-slim
# Create a writable cache directory
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Set environment variable for cache
ENV CACHE_DIR=/app/cache
# Set the working directory in the container
WORKDIR /app
# Copy the API code and dependencies
COPY . /app
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the API port
EXPOSE 8000
# Run the FastAPI server with Uvicorn
CMD ["uvicorn", "fast:app", "--host", "0.0.0.0", "--port", "8000"]