Trying to fix the docker container.
This commit is contained in:
parent
65e9f9f752
commit
c369f4e881
|
@ -25,4 +25,3 @@ COPY . /app/
|
||||||
# otherwise it does not know what the main app module is
|
# otherwise it does not know what the main app module is
|
||||||
RUN poetry install
|
RUN poetry install
|
||||||
|
|
||||||
CMD ./bin/boot_server_in_docker
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# run migrations
|
||||||
|
export FLASK_APP=/app/pb/__init__.py
|
||||||
|
|
||||||
|
if [ "$DOWNGRADE_DB" = "true" ]; then
|
||||||
|
echo 'Downgrading database...'
|
||||||
|
pipenv run flask db downgrade
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$UPGRADE_DB" = "true" ]; then
|
||||||
|
echo 'Upgrading database...'
|
||||||
|
pipenv run flask db upgrade
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$RESET_DB" = "true" ]; then
|
||||||
|
echo 'Clearing database and loading example data...'
|
||||||
|
pipenv run flask load-example-data
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$LOAD_EXAMPLE_SPONSORS" = "true" ]; then
|
||||||
|
echo 'Loading example data...'
|
||||||
|
pipenv run flask load-example-sponsors
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$APPLICATION_ROOT" = "/" ]; then
|
||||||
|
pipenv run gunicorn --bind 0.0.0.0:$PORT0 wsgi:app
|
||||||
|
else
|
||||||
|
pipenv run gunicorn -e SCRIPT_NAME="$APPLICATION_ROOT" --bind 0.0.0.0:$PORT0 wsgi:app
|
||||||
|
fi
|
Loading…
Reference in New Issue