-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from thijstakken/Release/2024.7
Release/2024.7
- Loading branch information
Showing
48 changed files
with
2,919 additions
and
471 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FLASK_APP=musicservice.py |
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 |
---|---|---|
@@ -1,2 +1,9 @@ | ||
database/ | ||
music/ | ||
music/ | ||
.vscode | ||
/webapp/db.sqlite | ||
venv/ | ||
__pycache__ | ||
instance/ | ||
download_archive/ | ||
webapp.db |
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
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,16 @@ | ||
#!/bin/bash | ||
# retry database connection until it is ready | ||
while true; do | ||
# Wait for the database service to be ready | ||
export FLASK_DB_UPGRADE=1 | ||
flask db upgrade | ||
if [[ "$?" == "0" ]]; then | ||
unset FLASK_DB_UPGRADE | ||
break | ||
fi | ||
# Unset the environment variable after the upgrade | ||
echo Upgrade command failed, retrying in 5 secs... | ||
sleep 5 | ||
done | ||
|
||
exec gunicorn -b :5678 --access-logfile - --error-logfile - musicservice:webapp |
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,11 @@ | ||
import os | ||
|
||
basedir = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
class Config: | ||
# /// = relative path, //// = absolute path | ||
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \ | ||
'sqlite:///' + os.path.join(basedir, 'webapp.db') | ||
SQLALCHEMY_TRACK_MODIFICATIONS = False | ||
SECRET_KEY = b'/\xed\xb4\x87$E\xf4O\xbb\x8fpb\xad\xc2\x88\x90!\x89\x18\xd0z\x15~Z' | ||
REDIS_URL = os.environ.get('REDIS_URL') or 'redis://' |
Oops, something went wrong.