Skip to content

Commit 54d73c7

Browse files
committed
Dockerfile changed
1 parent a0b4ba8 commit 54d73c7

3 files changed

Lines changed: 8 additions & 24 deletions

File tree

fri/Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
FROM centos/python-36-centos7
2-
3-
WORKDIR /fri
4-
COPY . /fri
5-
6-
COPY requirements.txt /fri/requirements.txt
7-
RUN pip install -r /fri/requirements.txt
8-
9-
10-
CMD ["gunicorn", "-w", "4", "--bind", "0.0.0.0:8080", "main:app"]
2+
COPY requirements.txt /tmp/requirements.txt
3+
RUN pip install -r /tmp/requirements.txt
4+
WORKDIR /fri
5+
COPY server /fri
6+
USER root
7+
RUN useradd fri && chown -R fri /fri
8+
USER fri
9+
CMD ["gunicorn", "--timeout=180", "--workers=4", "--bind=0.0.0.0:8080", "--access-logfile=-", "main:app"]

fri/main.py renamed to fri/server/main.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
app.secret_key = "secret key"
1313
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
1414

15-
@app.route('/')
16-
def hello_world():
17-
return render_template('home.html')
1815

1916
@app.route('/multiple-files-upload', methods=['POST'])
2017
def upload_file():

fri/templates/home.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)