Files
twimg-backend/Dockerfile
2025-08-02 01:10:14 -04:00

26 lines
781 B
Docker

# Start with an official Python runtime as a parent image
FROM python:3.13-slim
# Set the working directory in the container
WORKDIR /code
# Install FFMPEG
RUN apt-get update && \
apt-get install -y ffmpeg --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container
COPY ./requirements.txt /code/requirements.txt
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the application code into the container
COPY ./app /code/app
COPY ./.env /code/.env
# Expose port 80 to the outside world
EXPOSE 80
# Command to run the application using uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]