Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM alpine:latest

RUN apk --update add bash py-pip py3-magic py3-openssl openssl

ENV STATIC_PATH /var/www/html/fundamentus/

COPY ./required.txt /var/www/html/
RUN pip install --upgrade pip
RUN pip install -r /var/www/html/required.txt

#Copy api files
COPY ./*.py /var/www/html/

#Garbage collector
RUN rm -rf /var/www/html/requirements.txt

EXPOSE 5000
WORKDIR /var/www/html
ENTRYPOINT ["python3", "server.py"]
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def json_api():
lista = {outer_k: {inner_k: float(inner_v) for inner_k, inner_v in outer_v.items()} for outer_k, outer_v in lista.items()}
return jsonify(lista)

app.run(debug=True)
app.run(host='0.0.0.0', debug=True)