Ratings / Dockerfile
ToastFlix's picture
Update Dockerfile
b0ca1ed verified
raw
history blame contribute delete
638 Bytes
# Use an official Python runtime as a parent image
FROM python:3.10-slim-buster
# Set the working directory in the container to /app
WORKDIR /app
# Install git
RUN apt-get update && apt-get install -y git
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/DiogoMiguel93/Toast-Ratings.git /app || true
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
#EXPOSE the port
EXPOSE 8080
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--workers", "1"]
#CMD ["python", "main.py"]