-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch cmd to entrypoint for init cmds
- Loading branch information
Showing
2 changed files
with
53 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Set to exit on error | ||
set -e | ||
|
||
# Functions | ||
flask_db() { | ||
# Upgrade db task | ||
echo "Upgrading flask database..." | ||
flask db upgrade -d /usr/local/lib/python3.9/dist-packages/autobidsportal_migrations/ | ||
echo "Finished upgrading database" | ||
} | ||
|
||
|
||
init() { | ||
# Init web app task | ||
echo "+----------------------------+" | ||
echo "| Starting autobidsportal... |" | ||
echo "+----------------------------+" | ||
uwsgi --ini=autobidsportal.ini | ||
} | ||
|
||
|
||
# Main body of code | ||
flask_db | ||
init |