mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-24 11:54:53 +00:00
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
20 lines
509 B
Bash
20 lines
509 B
Bash
#!/bin/sh
|
|
|
|
# Check if migrastions folder exists
|
|
if [ ! -d "/data/storage/migrations" ];
|
|
then
|
|
echo "Creating tables..."
|
|
flask --app website db init
|
|
fi
|
|
|
|
# Check if there are any changes to the database
|
|
if ! $(flask --app website db check) | grep -q "No changes in schema detected.";
|
|
then
|
|
echo "Database changes detected! Migrating..."
|
|
flask --app website db migrate
|
|
flask --app website db upgrade
|
|
fi
|
|
|
|
# Start website!!!!
|
|
echo "Starting expo website..."
|
|
gunicorn --bind expo:5000 website:app
|