Mythus commited on
Commit
b620b0c
·
verified ·
1 Parent(s): f3345f2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -7,17 +7,20 @@ WORKDIR /app
7
  # Install python3 and pip3
8
  RUN apt-get update && apt-get install -y python3-pip
9
  RUN python3 -m pip install --upgrade pip setuptools wheel
 
 
10
  RUN pip3 install flask flask_restful
11
 
12
  # Install playwright python package and the browsers
13
  RUN pip3 install playwright
14
  RUN playwright install
15
 
16
- # Copy the Python script into the container at /app
17
  COPY generator.py /app/
 
18
 
19
- # Make ports 80 available to the world outside this container
20
  EXPOSE 8080
21
 
22
- # Run your_script.py when the container launches
23
- CMD ["python3", "generator.py"]
 
7
  # Install python3 and pip3
8
  RUN apt-get update && apt-get install -y python3-pip
9
  RUN python3 -m pip install --upgrade pip setuptools wheel
10
+
11
+ # Install Flask and Flask-RESTful
12
  RUN pip3 install flask flask_restful
13
 
14
  # Install playwright python package and the browsers
15
  RUN pip3 install playwright
16
  RUN playwright install
17
 
18
+ # Copy the Python scripts into the container at /app
19
  COPY generator.py /app/
20
+ COPY app.py /app/
21
 
22
+ # Make port 8080 available to the world outside this container
23
  EXPOSE 8080
24
 
25
+ # Run generator.py and flask run when the container launches
26
+ CMD python3 -u generator.py & python3 -u -m flask run --host=0.0.0.0 --port=8080