Added Docker stuff.

This commit is contained in:
msinkec 2020-07-20 09:01:58 +02:00
parent 66d5a12a87
commit f5ab4e7d52
3 changed files with 25 additions and 0 deletions

8
Dockerfile Normal file
View File

@ -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"]

12
docker-compose.yml Normal file
View File

@ -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

5
wsgi.py Normal file
View File

@ -0,0 +1,5 @@
from app import app
if __name__ == '__main__':
app.run()