Clean up and upgrades related to Python requirements, Flask, and FastAPI.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# FROM tiangolo/uvicorn-gunicorn-fastapi:latest
|
# FROM tiangolo/uvicorn-gunicorn-fastapi:latest
|
||||||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10
|
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11
|
||||||
|
|
||||||
LABEL maintainer="Scott Idem <scott.idem@oneskyit.com>"
|
LABEL maintainer="Scott Idem <scott.idem@oneskyit.com>"
|
||||||
|
|
||||||
@@ -26,13 +26,7 @@ COPY conf/aether_fastapi_requirements.txt /tmp/requirements.txt
|
|||||||
|
|
||||||
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
||||||
|
|
||||||
# RUN pip freeze
|
RUN pip freeze > /aether_fastapi_requirements_current.txt
|
||||||
# RUN mkdir /temp
|
RUN pip freeze > /tmp/aether_fastapi_requirements_current.txt
|
||||||
RUN pip freeze > /requirements_current.txt
|
|
||||||
# COPY requirements_current.txt tmp/requirements_current.txt
|
|
||||||
# RUN pip freeze > /logs/requirements_current.txt
|
|
||||||
|
|
||||||
# COPY conf/aether_fastapi_requirements.txt /tmp/requirements.txt
|
|
||||||
|
|
||||||
|
|
||||||
CMD ["gunicorn", "--conf", "/conf/gunicorn_fastapi_conf.py"]
|
CMD ["gunicorn", "--conf", "/conf/gunicorn_fastapi_conf.py"]
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ COPY conf/aether_flask_requirements.txt /tmp/requirements.txt
|
|||||||
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
||||||
|
|
||||||
RUN pip freeze > /aether_flask_requirements_current.txt
|
RUN pip freeze > /aether_flask_requirements_current.txt
|
||||||
# RUN pip freeze > /logs/aether_flask_requirements_current.txt
|
|
||||||
RUN pip freeze > /tmp/aether_flask_requirements_current.txt
|
RUN pip freeze > /tmp/aether_flask_requirements_current.txt
|
||||||
|
|
||||||
# CMD ["pip", "freeze > /logs/aether_flask_requirements_current.txt"]
|
|
||||||
# CMD ["pip", "freeze > /tmp/aether_flask_requirements_current.txt"]
|
|
||||||
|
|
||||||
CMD ["gunicorn", "--conf", "/conf/gunicorn_flask_conf.py"]
|
CMD ["gunicorn", "--conf", "/conf/gunicorn_flask_conf.py"]
|
||||||
|
|||||||
@@ -1,58 +1,63 @@
|
|||||||
|
# Updated manually 2023-09-12 with a lot of trial and error.
|
||||||
|
# A few are commented out even though they are actually used and required. Other packages already pull them in.
|
||||||
|
# SQLAlchemy needs to be upgraded to 2.x. There are issues with async IO or something related to that.
|
||||||
|
# https://docs.sqlalchemy.org/en/14/changelog/migration_20.html
|
||||||
|
|
||||||
# aioredis # BAD! Not maintained!
|
# aioredis # BAD! Not maintained!
|
||||||
aiofiles
|
aiofiles
|
||||||
anyio
|
anyio
|
||||||
argon2-cffi
|
argon2-cffi
|
||||||
argon2-cffi-bindings
|
argon2-cffi-bindings
|
||||||
asgiref
|
# asgiref
|
||||||
async-timeout
|
async-timeout
|
||||||
baize # added 2023-08-17
|
baize # added 2023-08-17
|
||||||
certifi
|
# certifi
|
||||||
cffi
|
# cffi
|
||||||
charset-normalizer
|
charset-normalizer
|
||||||
click
|
click
|
||||||
Deprecated
|
Deprecated
|
||||||
dnspython
|
dnspython
|
||||||
email-validator
|
email-validator
|
||||||
et-xmlfile
|
et-xmlfile
|
||||||
fastapi
|
fastapi>=0.88.0
|
||||||
greenlet
|
greenlet>=2.0.2
|
||||||
gunicorn
|
gunicorn>=20.1.0
|
||||||
h11
|
h11
|
||||||
html2text
|
html2text>=2020.1.16
|
||||||
httpcore
|
httpcore
|
||||||
httptools
|
httptools
|
||||||
httpx
|
httpx
|
||||||
idna
|
idna
|
||||||
itsdangerous
|
itsdangerous
|
||||||
Jinja2
|
# Jinja2>=3.1.2
|
||||||
MarkupSafe
|
MarkupSafe
|
||||||
mysqlclient
|
mysqlclient
|
||||||
numpy
|
numpy>=1.25.2
|
||||||
openpyxl
|
openpyxl
|
||||||
orjson
|
orjson
|
||||||
packaging
|
# packaging
|
||||||
pandas
|
pandas>=2.1.0
|
||||||
passlib
|
passlib
|
||||||
pdf2image
|
pdf2image>=1.16.3
|
||||||
Pillow
|
Pillow>=10.0.0
|
||||||
pycparser
|
pycparser
|
||||||
pydantic
|
pydantic>=1.10.12
|
||||||
PyJWT
|
PyJWT>=2.8.0
|
||||||
pyparsing
|
pyparsing
|
||||||
python-dateutil
|
python-dateutil
|
||||||
python-dotenv
|
python-dotenv
|
||||||
python-multipart
|
python-multipart
|
||||||
pytz
|
pytz
|
||||||
PyYAML
|
PyYAML>=6.0.1
|
||||||
qrcode
|
qrcode>=7.4.2
|
||||||
redis[hiredis]
|
redis[hiredis] # redis==5.0.0 hiredis==2.2.3
|
||||||
requests
|
requests
|
||||||
rfc3986
|
rfc3986
|
||||||
six
|
six
|
||||||
sniffio
|
sniffio
|
||||||
SQLAlchemy==1.4.47 # 1.4.47 is the newest I am working with
|
SQLAlchemy==1.4.49 # 1.4.47 is the newest (2.0.20) I am working with
|
||||||
starlette
|
starlette>=0.22.0
|
||||||
stripe
|
stripe>=6.4.0
|
||||||
typing_extensions
|
typing_extensions
|
||||||
ujson
|
ujson
|
||||||
urllib3
|
urllib3
|
||||||
@@ -60,6 +65,6 @@ uvicorn
|
|||||||
uvloop
|
uvloop
|
||||||
watchfiles
|
watchfiles
|
||||||
watchgod
|
watchgod
|
||||||
websockets
|
websockets>=11.0.3
|
||||||
wrapt
|
wrapt
|
||||||
xlrd
|
xlrd
|
||||||
|
|||||||
@@ -1,66 +1,40 @@
|
|||||||
argon2-cffi>=21
|
# Updated manually 2023-09-12 with a lot of trial and error.
|
||||||
# async-timeout>=4
|
# A few are commented out even though they are actually used and required. Other packages already pull them in.
|
||||||
# bidict>=0.21
|
|
||||||
Brotli>=1
|
argon2-cffi>=23.1.0 # Must keep
|
||||||
# cachelib==0.9.0
|
click>=8.1.7 # Must keep???
|
||||||
# certifi==2021.10.8
|
Deprecated>=1.2.14
|
||||||
# charset-normalizer>=2.0.9
|
Flask==2.0.3 # Must keep
|
||||||
click==7.1.2 # Must keep???
|
Flask-Caching>=2.0.2
|
||||||
cssselect2==0.4.1 # Must keep???
|
Flask-Cors>=4.0.0
|
||||||
Deprecated==1.2.13
|
|
||||||
eventlet==0.33.2
|
|
||||||
Flask>=1.1.4
|
|
||||||
Flask-Caching>=2.0.1
|
|
||||||
Flask-Cors>=3.0.10
|
|
||||||
Flask-MySQLdb>=1.0.1
|
Flask-MySQLdb>=1.0.1
|
||||||
Flask-SocketIO>=5.3.2
|
Flask-SocketIO>=5.3.6
|
||||||
Flask-SQLAlchemy==2.5.1
|
Flask-SQLAlchemy>=2.5.1
|
||||||
Flask-WeasyPrint>=0.6
|
gunicorn>=21.2.0
|
||||||
# fonttools>=4.28.4
|
html2text>=2020.1.16
|
||||||
gevent==22.10.2
|
# itsdangerous>=2.1.2
|
||||||
greenlet==2.0.1
|
Jinja2>=3.1.2
|
||||||
gunicorn>=20.1.0
|
# MarkupSafe>=2.1.3
|
||||||
html2text==2020.1.16
|
# mysqlclient>=2.2.0
|
||||||
html5lib==1.1
|
|
||||||
# idna==3.3
|
|
||||||
itsdangerous>=1.1.0
|
|
||||||
Jinja2>=2.11.3
|
|
||||||
MarkupSafe>=2.0.1
|
|
||||||
mypy==0.930
|
|
||||||
mypy-extensions==0.4.3
|
|
||||||
mysqlclient==2.1.0
|
|
||||||
numpy>=1.25.2
|
numpy>=1.25.2
|
||||||
# packaging==21.3
|
pandas>=2.1.0
|
||||||
pandas>=1.5.2
|
|
||||||
passlib>=1.7.4
|
passlib>=1.7.4
|
||||||
Pillow==9.3.0
|
Pillow>=10.0.0
|
||||||
pycparser==2.21
|
pydantic>=2.3.0
|
||||||
pydantic>=1.10.2
|
python-dateutil>=2.8.2
|
||||||
pydyf==0.1.2
|
python-engineio>=4.3.0
|
||||||
pyparsing==3.0.9
|
python-socketio>=5.5.0
|
||||||
pyphen==0.11.0
|
pytz>=2023.3.post1
|
||||||
python-dateutil==2.8.2
|
qrcode>=7.4.2
|
||||||
python-engineio==4.3.0
|
redis>=5.0.0
|
||||||
python-socketio==5.5.0
|
requests==2.28.1 # version 2.31.0 does not work?
|
||||||
pytz==2021.3
|
# six>=1.16.0
|
||||||
qrcode==7.3.1
|
SQLAlchemy>=2.0.20 # Must keep
|
||||||
redis>=4.3.5
|
stripe==5.0.0 # version 6.4.0 exists 2023-09-12
|
||||||
requests==2.28.1
|
types-pytz>=2023.3.0.1
|
||||||
# six==1.16.0
|
types-requests>=2.31.0.2
|
||||||
SQLAlchemy==1.4.28
|
types-urllib3>=1.26.25.14
|
||||||
stripe==5.0.0
|
typing_extensions>=4.7.1
|
||||||
suds-py3==1.4.5.0
|
# urllib3>=1.26.16
|
||||||
tinycss2>=1.1.1
|
Werkzeug>=2.3.7
|
||||||
# tomli==2.0.0
|
xmltodict>=0.13.0 # Must keep
|
||||||
types-pytz>=2022.1.2
|
|
||||||
types-requests>=2.28.10
|
|
||||||
types-urllib3>=1.26.24
|
|
||||||
typing_extensions>=4.4.0
|
|
||||||
urllib3>=1.26.7
|
|
||||||
uvicorn>=0.18.3
|
|
||||||
weasyprint>=53.4
|
|
||||||
webencodings>=0.5.1
|
|
||||||
Werkzeug>=0.16.1
|
|
||||||
wrapt>=1.13.3
|
|
||||||
xlrd>=2.0.1
|
|
||||||
xmltodict>=0.13.0
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ server {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
# server_name ${DOCKER_PHPMYADMIN_SERVER_NAME};
|
# server_name ${DOCKER_PHPMYADMIN_SERVER_NAME};
|
||||||
server_name phpmyadmin-oneskyit.localhost phpmyadmin.oneskyit.com dev-phpmyadmin.oneskyit.com test-phpmyadmin.oneskyit.com;
|
server_name phpmyadmin-oneskyit.localhost phpmyadmin.oneskyit.com dev-phpmyadmin.oneskyit.com test-phpmyadmin.oneskyit.com;
|
||||||
@@ -49,4 +49,4 @@ server {
|
|||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ server {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
server_name ${DOCKER_AE_API_V5_SERVER_NAME} v5-fastapi.localhost api-v5.localhost;
|
server_name ${DOCKER_AE_API_V5_SERVER_NAME} v5-fastapi.localhost api-v5.localhost;
|
||||||
# server_name
|
# server_name
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ server {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
server_name ${DOCKER_AE_API_SERVER_NAME} fastapi.localhost api.localhost;
|
server_name ${DOCKER_AE_API_SERVER_NAME} fastapi.localhost api.localhost;
|
||||||
# server_name
|
# server_name
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ server {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
# The Docker nginx envsubst with templates does not work for multiple server names.
|
# The Docker nginx envsubst with templates does not work for multiple server names.
|
||||||
# server_name
|
# server_name
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ server {
|
|||||||
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
# server_name docker.oneskyit.com ${DOCKER_OSIT_SERVER_NAME};
|
# server_name docker.oneskyit.com ${DOCKER_OSIT_SERVER_NAME};
|
||||||
server_name docker.oneskyit.com dev-docker.oneskyit.com test-docker.oneskyit.com prod-docker.oneskyit.com ${DOCKER_OSIT_SERVER_NAME};
|
server_name docker.oneskyit.com dev-docker.oneskyit.com test-docker.oneskyit.com prod-docker.oneskyit.com ${DOCKER_OSIT_SERVER_NAME};
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ server {
|
|||||||
# }
|
# }
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user