Skip to content

Commit 3c7b80d

Browse files
committedFeb 6, 2021
docker
1 parent acc8c31 commit 3c7b80d

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed
 

Diff for: ‎Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ RUN pip install --no-cache-dir -r requirements.txt
1010

1111
COPY . .
1212

13-
ENTRYPOINT ["python", "main.py", "--host", "0.0.0.0", "--port", "5000"]
13+
# ENTRYPOINT ["python", "main.py", "--host", "0.0.0.0", "--port", "5000"]
14+
ENTRYPOINT ["gunicorn", "-b", "0.0.0.0:5000", "-w", "10", "-t", "30", "main:app"]

Diff for: ‎Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
build:
22
docker build . -t interactive-tutorials
33
run:
4-
docker run -p 5000:5000 interactive-tutorials -d learnpython.org
4+
docker run -p 5000:5000 interactive-tutorials "-d learnpython.org"
5+
run_prod:
6+
docker run -p 5000:80 interactive-tutorials "-d learnpython.org"

Diff for: ‎requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
flask>=1.0.0
2-
fpdf==1.7.2
3-
redis==2.10.5
1+
flask
2+
redis
3+
gunicorn

Diff for: ‎website_docker.conf

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
description "website_docker"
2+
3+
start on runlevel [2345]
4+
stop on runlevel [016]
5+
6+
respawn
7+
chdir /root/interactive-tutorials-python3
8+
exec docker run -p 5000:80 interactive-tutorials "-d learnpython.org"

0 commit comments

Comments
 (0)
Please sign in to comment.