Merge branch 'master' of github.com:sartography/cr-connect-workflow
This commit is contained in:
commit
e1148e1b3d
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue