mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-23 11:34:51 +00:00
Fuck so much to comment on
Renamed the folders and containers to something more reasonable Using .env file for secretes so I can better hide them from git Mostly it, I think
This commit is contained in:
parent
a29f06dfee
commit
a4ebfa8552
61 changed files with 84 additions and 111 deletions
|
@ -1,29 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Wait for database to start
|
||||
until pg_isready -d $DB_NAME -h $DB_HOST -U $DB_USER
|
||||
do
|
||||
echo "Waiting for database to start... (5s)"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Database is ready!"
|
||||
|
||||
# Check if migrastions folder exists
|
||||
if [ ! -d "/data/storage/migrations" ];
|
||||
then
|
||||
echo "Creating tables..."
|
||||
flask --app server db init
|
||||
fi
|
||||
|
||||
# Check if there are any changes to the database
|
||||
if ! $(flask --app server db check | grep -q "No changes in schema detected.");
|
||||
then
|
||||
echo "Database changes detected! Migrating..."
|
||||
flask --app server db migrate
|
||||
flask --app server db upgrade
|
||||
fi
|
||||
|
||||
# Start server!!!!
|
||||
echo "Starting server..."
|
||||
gunicorn --bind highscore:8000 server:app
|
Loading…
Add table
Add a link
Reference in a new issue