python 3.9 changes

This commit is contained in:
mac 2021-11-07 13:51:53 -05:00
parent ae5f3a3212
commit a111805684
7 changed files with 27 additions and 15 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"python.formatting.provider": "autopep8"
}

View File

@ -1,11 +1,18 @@
FROM python:3.6
FROM python:3.9
ENV FLASK_APP run.py
COPY run.py gunicorn-cfg.py requirements.txt config.py .env ./
COPY app app
RUN pip install -r requirements.txt
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5005
# gunicorn
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]

View File

@ -35,7 +35,7 @@ class ProductionConfig(Config):
SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}:{}/{}'.format(
config( 'DB_ENGINE' , default='postgresql' ),
config( 'DB_USERNAME' , default='postgres' ),
config( 'DB_PASS' , default='mypassword' ),
config( 'DB_PASS' , default='password' ),
config( 'DB_HOST' , default='localhost' ),
config( 'DB_PORT' , default=5432 ),
config( 'DB_NAME' , default='appseed-flask' )

View File

@ -1,4 +1,4 @@
version: '3'
version: '3.8'
services:
appseed-app:
restart: always

View File

@ -1,2 +1,2 @@
-r requirements.txt
psycopg2
psycopg2-binary

View File

@ -1,9 +1,11 @@
flask==1.1.2
flask_login==0.5.0
flask_migrate==2.7.0
flask_wtf==0.14.3
flask_sqlalchemy==2.4.4
sqlalchemy==1.3.23
email_validator==1.1.2
python-decouple==3.4
gunicorn==20.0.4
flask
flask_login
flask_migrate
flask_wtf
flask_sqlalchemy
sqlalchemy
email_validator
python-decouple
gunicorn
jinja2
babel

View File

@ -1 +1 @@
python-3.6.10
python-3.8.10