Clean up and upgrades related to Python requirements, Flask, and FastAPI.

This commit is contained in:
Scott Idem
2023-09-12 15:41:09 -04:00
parent 42b6e8ed08
commit 92baaccb48
12 changed files with 76 additions and 107 deletions

View File

@@ -1,5 +1,5 @@
# 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>"
@@ -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 freeze
# RUN mkdir /temp
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
RUN pip freeze > /aether_fastapi_requirements_current.txt
RUN pip freeze > /tmp/aether_fastapi_requirements_current.txt
CMD ["gunicorn", "--conf", "/conf/gunicorn_fastapi_conf.py"]

View File

@@ -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 freeze > /aether_flask_requirements_current.txt
# RUN pip freeze > /logs/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"]

View File

@@ -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!
aiofiles
anyio
argon2-cffi
argon2-cffi-bindings
asgiref
# asgiref
async-timeout
baize # added 2023-08-17
certifi
cffi
# certifi
# cffi
charset-normalizer
click
Deprecated
dnspython
email-validator
et-xmlfile
fastapi
greenlet
gunicorn
fastapi>=0.88.0
greenlet>=2.0.2
gunicorn>=20.1.0
h11
html2text
html2text>=2020.1.16
httpcore
httptools
httpx
idna
itsdangerous
Jinja2
# Jinja2>=3.1.2
MarkupSafe
mysqlclient
numpy
numpy>=1.25.2
openpyxl
orjson
packaging
pandas
# packaging
pandas>=2.1.0
passlib
pdf2image
Pillow
pdf2image>=1.16.3
Pillow>=10.0.0
pycparser
pydantic
PyJWT
pydantic>=1.10.12
PyJWT>=2.8.0
pyparsing
python-dateutil
python-dotenv
python-multipart
pytz
PyYAML
qrcode
redis[hiredis]
PyYAML>=6.0.1
qrcode>=7.4.2
redis[hiredis] # redis==5.0.0 hiredis==2.2.3
requests
rfc3986
six
sniffio
SQLAlchemy==1.4.47 # 1.4.47 is the newest I am working with
starlette
stripe
SQLAlchemy==1.4.49 # 1.4.47 is the newest (2.0.20) I am working with
starlette>=0.22.0
stripe>=6.4.0
typing_extensions
ujson
urllib3
@@ -60,6 +65,6 @@ uvicorn
uvloop
watchfiles
watchgod
websockets
websockets>=11.0.3
wrapt
xlrd

View File

@@ -1,66 +1,40 @@
argon2-cffi>=21
# async-timeout>=4
# bidict>=0.21
Brotli>=1
# cachelib==0.9.0
# certifi==2021.10.8
# charset-normalizer>=2.0.9
click==7.1.2 # Must keep???
cssselect2==0.4.1 # Must keep???
Deprecated==1.2.13
eventlet==0.33.2
Flask>=1.1.4
Flask-Caching>=2.0.1
Flask-Cors>=3.0.10
# 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.
argon2-cffi>=23.1.0 # Must keep
click>=8.1.7 # Must keep???
Deprecated>=1.2.14
Flask==2.0.3 # Must keep
Flask-Caching>=2.0.2
Flask-Cors>=4.0.0
Flask-MySQLdb>=1.0.1
Flask-SocketIO>=5.3.2
Flask-SQLAlchemy==2.5.1
Flask-WeasyPrint>=0.6
# fonttools>=4.28.4
gevent==22.10.2
greenlet==2.0.1
gunicorn>=20.1.0
html2text==2020.1.16
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
Flask-SocketIO>=5.3.6
Flask-SQLAlchemy>=2.5.1
gunicorn>=21.2.0
html2text>=2020.1.16
# itsdangerous>=2.1.2
Jinja2>=3.1.2
# MarkupSafe>=2.1.3
# mysqlclient>=2.2.0
numpy>=1.25.2
# packaging==21.3
pandas>=1.5.2
pandas>=2.1.0
passlib>=1.7.4
Pillow==9.3.0
pycparser==2.21
pydantic>=1.10.2
pydyf==0.1.2
pyparsing==3.0.9
pyphen==0.11.0
python-dateutil==2.8.2
python-engineio==4.3.0
python-socketio==5.5.0
pytz==2021.3
qrcode==7.3.1
redis>=4.3.5
requests==2.28.1
# six==1.16.0
SQLAlchemy==1.4.28
stripe==5.0.0
suds-py3==1.4.5.0
tinycss2>=1.1.1
# tomli==2.0.0
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
Pillow>=10.0.0
pydantic>=2.3.0
python-dateutil>=2.8.2
python-engineio>=4.3.0
python-socketio>=5.5.0
pytz>=2023.3.post1
qrcode>=7.4.2
redis>=5.0.0
requests==2.28.1 # version 2.31.0 does not work?
# six>=1.16.0
SQLAlchemy>=2.0.20 # Must keep
stripe==5.0.0 # version 6.4.0 exists 2023-09-12
types-pytz>=2023.3.0.1
types-requests>=2.31.0.2
types-urllib3>=1.26.25.14
typing_extensions>=4.7.1
# urllib3>=1.26.16
Werkzeug>=2.3.7
xmltodict>=0.13.0 # Must keep

View File

@@ -24,7 +24,7 @@ server {
server {
listen 443 ssl;
listen [::]:443 ssl http2;
listen [::]:443 ssl;
# server_name ${DOCKER_PHPMYADMIN_SERVER_NAME};
server_name phpmyadmin-oneskyit.localhost phpmyadmin.oneskyit.com dev-phpmyadmin.oneskyit.com test-phpmyadmin.oneskyit.com;

View File

@@ -65,7 +65,7 @@ server {
server {
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

View File

@@ -65,7 +65,7 @@ server {
server {
listen 443 ssl;
listen [::]:443 ssl http2;
listen [::]:443 ssl;
server_name ${DOCKER_AE_API_SERVER_NAME} fastapi.localhost api.localhost;
# server_name

View File

@@ -57,7 +57,7 @@ server {
server {
listen 443 ssl;
listen [::]:443 ssl http2;
listen [::]:443 ssl;
# The Docker nginx envsubst with templates does not work for multiple server names.
# server_name

View File

@@ -44,8 +44,8 @@ server {
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 443 ssl;
listen [::]:443 ssl;
# 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};

View File

@@ -66,8 +66,8 @@ server {
# }
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 443 ssl;
listen [::]:443 ssl;
server_name _;