Merge branch 'master' of github.com:sartography/cr-connect-workflow

This commit is contained in:
Dan Funk 2020-02-07 11:34:57 -05:00
commit e1148e1b3d
3 changed files with 10 additions and 1 deletions

View File

@ -20,6 +20,7 @@ RUN pipenv install --dev
COPY . /crc-workflow/
# run webserver by default
ENV FLASK_APP=./crc/__init__.py
CMD ["pipenv", "run", "python", "./run.py"]
# expose ports

View File

@ -20,6 +20,7 @@ if "TESTING" in os.environ and os.environ["TESTING"] == "true":
app.config.from_pyfile('testing.py')
else:
# load the instance/config.py, if it exists, when not testing
app.config.root_path = app.instance_path
app.config.from_pyfile('config.py', silent=True)
db = SQLAlchemy(app)

View File

@ -1,5 +1,12 @@
#!/bin/bash
# run migrations
export FLASK_APP=./crc/__init__.py
pipenv run flask db upgrade
pipenv run flask load-example-data
if [ "$RESET_DB" = "true" ]; then
echo 'Resetting database...'
pipenv run flask load-example-data
fi
pipenv run python ./run.py