python 3.9 changes
This commit is contained in:
parent
ae5f3a3212
commit
a111805684
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"python.formatting.provider": "autopep8"
|
||||||
|
}
|
11
Dockerfile
11
Dockerfile
@ -1,11 +1,18 @@
|
|||||||
FROM python:3.6
|
FROM python:3.9
|
||||||
|
|
||||||
ENV FLASK_APP run.py
|
ENV FLASK_APP run.py
|
||||||
|
|
||||||
COPY run.py gunicorn-cfg.py requirements.txt config.py .env ./
|
COPY run.py gunicorn-cfg.py requirements.txt config.py .env ./
|
||||||
COPY app app
|
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
|
EXPOSE 5005
|
||||||
|
# gunicorn
|
||||||
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
|
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
|
||||||
|
@ -35,7 +35,7 @@ class ProductionConfig(Config):
|
|||||||
SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}:{}/{}'.format(
|
SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}:{}/{}'.format(
|
||||||
config( 'DB_ENGINE' , default='postgresql' ),
|
config( 'DB_ENGINE' , default='postgresql' ),
|
||||||
config( 'DB_USERNAME' , default='postgres' ),
|
config( 'DB_USERNAME' , default='postgres' ),
|
||||||
config( 'DB_PASS' , default='mypassword' ),
|
config( 'DB_PASS' , default='password' ),
|
||||||
config( 'DB_HOST' , default='localhost' ),
|
config( 'DB_HOST' , default='localhost' ),
|
||||||
config( 'DB_PORT' , default=5432 ),
|
config( 'DB_PORT' , default=5432 ),
|
||||||
config( 'DB_NAME' , default='appseed-flask' )
|
config( 'DB_NAME' , default='appseed-flask' )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: '3'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
appseed-app:
|
appseed-app:
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
psycopg2
|
psycopg2-binary
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
flask==1.1.2
|
flask
|
||||||
flask_login==0.5.0
|
flask_login
|
||||||
flask_migrate==2.7.0
|
flask_migrate
|
||||||
flask_wtf==0.14.3
|
flask_wtf
|
||||||
flask_sqlalchemy==2.4.4
|
flask_sqlalchemy
|
||||||
sqlalchemy==1.3.23
|
sqlalchemy
|
||||||
email_validator==1.1.2
|
email_validator
|
||||||
python-decouple==3.4
|
python-decouple
|
||||||
gunicorn==20.0.4
|
gunicorn
|
||||||
|
jinja2
|
||||||
|
babel
|
||||||
|
@ -1 +1 @@
|
|||||||
python-3.6.10
|
python-3.8.10
|
||||||
|
Loading…
Reference in New Issue
Block a user