forked from ScoDoc/ScoDoc
display db URI at startup.
This commit is contained in:
parent
6090672089
commit
fc3e7ba079
@ -51,7 +51,9 @@ def create_app(config_class=DevConfig):
|
||||
app.logger.setLevel(logging.DEBUG)
|
||||
app.config.from_object(config_class)
|
||||
|
||||
app.logger.info(f"create_app({config_class.__name__})")
|
||||
app.logger.info(
|
||||
f"create_app({config_class.__name__}, {config_class.SQLALCHEMY_DATABASE_URI})"
|
||||
)
|
||||
db.init_app(app)
|
||||
migrate.init_app(app, db)
|
||||
login.init_app(app)
|
||||
|
@ -99,7 +99,7 @@ then
|
||||
echo "Upgrading existing SCODOC database..."
|
||||
# utilise les scripts dans migrations/version/
|
||||
# pour mettre à jour notre base (en tant qu'utilisateur scodoc)
|
||||
export SQLALCHEMY_DATABASE_URI="postgresql:///SCODOC"
|
||||
export FLASK_ENV="production"
|
||||
su -c "(cd $SCODOC_DIR && source venv/bin/activate && flask db upgrade)" "$SCODOC_USER"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user