ToastFlix commited on
Commit
52ee747
·
verified ·
1 Parent(s): 8e8412f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim-buster
3
+ # Set the working directory in the container to /app
4
+ WORKDIR /app
5
+
6
+ # Install git
7
+ RUN apt-get update && apt-get install -y git
8
+
9
+ RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
10
+ git clone https://$(cat /run/secrets/GITHUB_TOKEN)github.com/DiogoMiguel93/Toast-Ratings.git /app || true
11
+
12
+ # Install any needed packages specified in requirements.txt
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ #EXPOSE the port
16
+ EXPOSE 8080
17
+
18
+ # Run run.py when the container launches
19
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]