Browse Source

Added MariaDB config for production use

joel
Simon Bowie 3 years ago
parent
commit
96df4161e1
3 changed files with 4 additions and 2 deletions
  1. +1
    -1
      nginx-conf/toolkit.conf
  2. +2
    -1
      web/app/__init__.py
  3. +1
    -0
      web/requirements.txt

+ 1
- 1
nginx-conf/toolkit.conf View File

location / { location / {
proxy_pass http://toolkit; proxy_pass http://toolkit;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_redirect off; proxy_redirect off;
} }



+ 2
- 1
web/app/__init__.py View File

# get config variables from OS environment variables: set in env file passed through Docker Compose # get config variables from OS environment variables: set in env file passed through Docker Compose
app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY') app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY')
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL') app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = 'False'
app.config['SQLALCHEMY_ECHO'] = False
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False


db.init_app(app) db.init_app(app)



+ 1
- 0
web/requirements.txt View File

flask-login flask-login
flask-moment flask-moment
gunicorn gunicorn
pymysql

Loading…
Cancel
Save