Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move complete bootstrap process into freezing-model with script #12

Open
obscurerichard opened this issue Jan 10, 2019 · 0 comments
Open
Labels
good first issue Good for newcomers

Comments

@obscurerichard
Copy link
Member

obscurerichard commented Jan 10, 2019

Right now the only place in the code that bootstraps the model is from the freezing.web init:

import os
import os.path

from flask import Flask, session, g
from freezing.model import init_model, meta

from .config import config

app = Flask(__name__, static_url_path='/assets')
app.config.from_object(config)

init_model(config.SQLALCHEMY_URL)

It would be good to have a freezing-model init command that would do this also, something that paid attention to the SQLALCHEMY_URL or a command line switch for the URL.

If we did it this, and packaged it into Docker, we could have the database upgrade process decoupled from the web initialization process. That would be beneficial in that a mistake in the database upgrade would not prevent the web site from starting.

@obscurerichard obscurerichard added enhancement New feature or request good first issue Good for newcomers labels Jan 10, 2019
@obscurerichard obscurerichard removed the enhancement New feature or request label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant