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
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# TODO: change this to -alpine later and add gcc and other required tools
FROM python:3.8.10-alpine
RUN mkdir /app
WORKDIR /app

# ADD requirements.txt /app
ADD airdocs-webserver.py /app/
ADD compare_signatures.py /app/
ADD utils.py /app/

ARG port
RUN echo Port exposed: ${port}
EXPOSE ${port}

# RUN pip3 install -r requirements.txt
RUN pip3 install numpy scipy sklearn
ENV airdocs_port=${port}
# CMD ["python3", "airdocs-webserver.py", "-l", "0.0.0.0", "-p 8081"]
CMD ["sh", "-c", "python3 airdocs-webserver.py -l 0.0.0.0 -p ${airdocs_port}"]

# TODO:
# HTTPS, limitare dimensiune documente -> Sa nu poti pune Gigs of data
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PORT=80

container:
docker build --build-arg port=$(PORT) --tag $(TAG) --file ./Dockerfile ./

docker-run:
docker run -p $(EXTPORT):$(PORT) $(TAG)
Loading