diff --git a/.gitignore b/.gitignore index 626f7d0..a9e0ec3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +.venv38 + + # Byte-compiled / optimized / DLL files *__pycache__/ *.py[cod] diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ad15b57 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.8-slim + +WORKDIR /app +COPY . . + +RUN apt-get update && apt-get install -y gcc libc6-dev libffi-dev libgl1-mesa-glx libglib2.0-0 ghostscript + +RUN pip install . + +EXPOSE 5000 + +RUN excalibur initdb +CMD ["excalibur", "webserver"] diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..74fb831 --- /dev/null +++ b/compose.yml @@ -0,0 +1,8 @@ +version: '3.8' + +services: + excalibur: + build: . + ports: + - "5000:5000" + diff --git a/excalibur/config_templates/default_excalibur.cfg b/excalibur/config_templates/default_excalibur.cfg index fd3dc67..2c7ef05 100644 --- a/excalibur/config_templates/default_excalibur.cfg +++ b/excalibur/config_templates/default_excalibur.cfg @@ -15,7 +15,7 @@ logging_level = INFO [webserver] # The host interface on which to listen. # 127.0.0.1 means the web server will only respond to requests from the local machine. -web_server_host = 127.0.0.1 +web_server_host = 0.0.0.0 # The port on which to run the web server. web_server_port = 5000 diff --git a/excalibur/www/views.py b/excalibur/www/views.py index 19bf187..fd24d3d 100644 --- a/excalibur/www/views.py +++ b/excalibur/www/views.py @@ -14,7 +14,7 @@ render_template, send_from_directory, ) -from werkzeug import secure_filename +from werkzeug.utils import secure_filename from .. import configuration as conf from ..models import Job, File, Rule diff --git a/setup.py b/setup.py index a618161..d16e2bc 100644 --- a/setup.py +++ b/setup.py @@ -16,9 +16,10 @@ "celery>=4.1.1", "Click>=7.0", "configparser>=3.5.0, <3.6.0", - "Flask>=1.0.2", + "Flask>=2.1.1", "SQLAlchemy>=1.2.12", - "Werkzeug<1.0.0", + "PyPDF2==2.0", + "pandas==1.5.3", ] mysql = ["mysqlclient>=1.3.6"] all_requires = requires + mysql