aboutsummaryrefslogtreecommitdiff
path: root/boot.sh
blob: c15b1c49f99785cc96d3cbe5e7b45d7fdd407c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# Activate the virtual environment
poetry shell

# Run database migrations
while true; do
	flask db upgrade
	if [[ "$?" == "0" ]]; then
		break;
	fi
	echo "Upgrade command failed, retrying in 5 seconds ..."
	sleep 5
done

exec gunicorn -b :7831 --preload --access-logfile - --error-logfile - annotate_change:app