TR-TEST / Dockerfile
ToastFlix's picture
Create Dockerfile
5f953ee verified
raw
history blame
623 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 -b test 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", "balancer:app", "--host", "0.0.0.0", "--port", "8080", "--workers", "2"]