Skip to content

Commit

Permalink
[UPD] Updated to Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
whikernel committed Dec 17, 2024
1 parent 0e51267 commit 8a1f67d
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 27 deletions.
4 changes: 2 additions & 2 deletions docker/webApp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#################
# COMPILE IMAGE #
#################
FROM python:3.9 AS compile-image
FROM python:3.12 AS compile-image
RUN apt-get update

RUN python -m venv /opt/venv
Expand All @@ -35,7 +35,7 @@ RUN pip3 install -r requirements.txt
###############
# BUILD IMAGE #
###############
FROM python:3.9 as iriswebapp
FROM python:3.12 as iriswebapp
ENV PYTHONUNBUFFERED=1 DOCKERIZED=1

COPY --from=compile-image /opt/venv /opt/venv
Expand Down
2 changes: 1 addition & 1 deletion docker/webApp/iris-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ printf "Running ${target} ...\n"
if [[ "${target}" == iris-worker ]] ; then
celery -A app.celery worker -E -B -l INFO &
else
gunicorn app:app --worker-class eventlet --bind 0.0.0.0:8000 --timeout 180 --worker-connections 1000 --log-level=info &
gunicorn app:app --bind 0.0.0.0:8000 --timeout 180 --worker-connections 1000 --threads 100 -w 1 --log-level=info &
fi

while true; do sleep 2; done
Expand Down
11 changes: 5 additions & 6 deletions source/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from flask_socketio import SocketIO, Namespace
from flask_sqlalchemy import SQLAlchemy
from functools import partial
from sqlalchemy_imageattach.stores.fs import HttpExposedFileSystemStore
from werkzeug.middleware.proxy_fix import ProxyFix

from app.flask_dropzone import Dropzone
Expand Down Expand Up @@ -116,13 +115,13 @@ def ac_current_user_has_manage_perms():

celery = make_celery(app)

store = HttpExposedFileSystemStore(
path='images',
prefix='/static/assets/images/'
)
# store = HttpExposedFileSystemStore(
# path='images',
# prefix='/static/assets/images/'
# )

app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1)
app.wsgi_app = store.wsgi_middleware(app.wsgi_app)
#app.wsgi_app = store.wsgi_middleware(app.wsgi_app)

socket_io = SocketIO(app, cors_allowed_origins="*")

Expand Down
6 changes: 6 additions & 0 deletions source/app/blueprints/graphql/graphql_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
from app.blueprints.graphql.cases import CaseUpdate
from app.blueprints.graphql.cases import CaseConnection

import warnings

# Ignore all UserWarnings
warnings.filterwarnings("ignore", category=UserWarning)



class Query(ObjectType):
"""This is the IRIS GraphQL queries documentation!"""
Expand Down
1 change: 1 addition & 0 deletions source/app/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ class CeleryConfig:
result_extended = True
result_serializer = "json"
worker_pool_restarts = True
broker_connection_retry_on_startup =True


# --------- APP ---------
Expand Down
2 changes: 1 addition & 1 deletion source/app/flask_dropzone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""
import warnings
from flask import Blueprint
from flask import Markup
from markupsafe import Markup
from flask import current_app
from flask import render_template_string
from flask import url_for
Expand Down
Binary file modified source/dependencies/docx_generator-0.8.0-py3-none-any.whl
Binary file not shown.
31 changes: 15 additions & 16 deletions source/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
azure-identity==1.10.0
azure-keyvault-secrets==4.5.1
celery==5.2.7
Flask==2.3.2
celery==5.4.0
Flask==3.1.0
Flask-Bcrypt==1.0.1
Flask-Login==0.6.2
Flask-SQLAlchemy==3.0.2
Flask-WTF==1.1.1
flask-marshmallow==0.14.0
Flask-Caching==1.10.1
marshmallow==3.20.1
marshmallow-sqlalchemy==0.30.0
gunicorn==20.1.0
Flask-Login==0.6.3
Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.2
flask-marshmallow==1.2.1
Flask-Caching==2.3.0
marshmallow==3.23.1
marshmallow-sqlalchemy==1.1.0
gunicorn==23.0.0
psycopg2-binary==2.9.10
pyunpack==0.2.2
packaging==21.3
requests==2.31.0
SQLAlchemy==2.0.24
SQLAlchemy==2.0.36
SQLAlchemy-ImageAttach==1.1.0
SQLAlchemy-Utils==0.41.1
SQLAlchemy-Utils==0.41.2
urllib3==1.26.18
Werkzeug==2.3.7
WTForms==2.2.1
flask-socketio==5.1.1
eventlet==0.30.2
Werkzeug==3.1.3
WTForms==3.2.1
Flask-SocketIO==5.4.1
alembic==1.7.5
setuptools~=70.3.0
python-dateutil==2.8.2
Expand Down
2 changes: 1 addition & 1 deletion source/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@


if __name__ == "__main__":
socket_io.run(app, host='127.0.0.1', port=8000, debug=True)
socket_io.run(app, host='127.0.0.1', port=8000, debug=True, allow_unsafe_werkzeug=True)

0 comments on commit 8a1f67d

Please sign in to comment.