1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-05 05:05:17 +02:00

Added new trip plan creator and removed visit count stores

This commit is contained in:
Sean Morley 2024-05-06 23:13:32 +00:00
parent 75da1f4cc6
commit 01865951ac
19 changed files with 967 additions and 522 deletions

View file

@ -9,22 +9,6 @@ wait_for_db() {
echo "Database is now available."
}
# Function to run SQL scripts
run_sql_scripts() {
echo "Running SQL scripts..."
# Define the path to your SQL scripts
SQL_SCRIPTS_PATH="/sql" # Replace with the path to your SQL scripts
# Run each SQL script in the directory using the DATABASE_URL
for sql_script in "$SQL_SCRIPTS_PATH"/*.sql; do
echo "Running script: $sql_script"
psql "$DATABASE_URL" -f "$sql_script"
done
echo "Finished running SQL scripts."
}
# Start your application here
# Print message
echo "Starting AdventureLog"
@ -34,18 +18,9 @@ if [ -z "$SKIP_DB_WAIT" ] || [ "$SKIP_DB_WAIT" = "false" ]; then
wait_for_db
fi
# Wait for the database to start up
# generate the schema
# npm run generate
# Run database migration
npm run migrate
# Run SQL scripts
# run_sql_scripts
echo "The origin to be set is: $ORIGIN"
# Start the application
ORIGIN=$ORIGIN node build