diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f076965 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:alpine + +RUN pip install --no-cache-dir flask gunicorn + +COPY . /api +WORKDIR /api + +CMD ["gunicorn", "--bind", "0.0.0.0:80", "-w", "4", "--timeout", "1800", "--access-logfile", "-", "--preload", "wsgi:app"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3881a0a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" +services: + webapp: + build: . + ports: + - 127.0.0.1:5000:80 + environment: + - GF_FOLDER=/data/ + volumes: + - /net/nas/resources/corpus/gigafida/v2.0/gigafida_dedup/tei/data:/data + + diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..d89957f --- /dev/null +++ b/wsgi.py @@ -0,0 +1,5 @@ +from app import app + +if __name__ == '__main__': + app.run() +