-
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.
chore: remove unwanted setup in fly.toml
- Loading branch information
1 parent
514401b
commit d5dc74b
Showing
3 changed files
with
24 additions
and
66 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 |
---|---|---|
@@ -1,56 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Ensure the storage folder has the correct structure | ||
STORAGE_PATH=/var/www/html/storage | ||
STORAGE_BACKUP_PATH=/var/www/html/storage_ | ||
|
||
if [ ! -d "$STORAGE_PATH/app" ]; then | ||
echo "$STORAGE_PATH/app is not a directory, copying content from $STORAGE_BACKUP_PATH to $STORAGE_PATH" | ||
cp -r $STORAGE_BACKUP_PATH/. $STORAGE_PATH | ||
echo "Deleting $STORAGE_BACKUP_PATH..." | ||
rm -rf $STORAGE_BACKUP_PATH | ||
fi | ||
|
||
# Ensure the database folder and SQLite file exist | ||
DB_FOLDER=$STORAGE_PATH/database | ||
DB_FILE=$DB_FOLDER/database.sqlite | ||
|
||
if [ ! -d "$DB_FOLDER" ]; then | ||
echo "$DB_FOLDER does not exist, initializing database folder" | ||
mkdir -p $DB_FOLDER | ||
FOLDER=/var/www/html/storage/app | ||
if [ ! -d "$FOLDER" ]; then | ||
echo "$FOLDER is not a directory, copying storage_ content to storage" | ||
cp -r /var/www/html/storage_/. /var/www/html/storage | ||
echo "deleting storage_..." | ||
rm -rf /var/www/html/storage_ | ||
fi | ||
|
||
if [ ! -f "$DB_FILE" ]; then | ||
echo "$DB_FILE not found, creating SQLite database" | ||
touch $DB_FILE | ||
FOLDER=/var/www/html/storage/database | ||
if [ ! -d "$FOLDER" ]; then | ||
echo "$FOLDER is not a directory, initializing database" | ||
mkdir /var/www/html/storage/database | ||
touch /var/www/html/storage/database/database.sqlite | ||
fi | ||
|
||
echo "Script execution completed." | ||
#!/bin/bash | ||
|
||
# Ensure the storage folder has the correct structure | ||
STORAGE_PATH=/var/www/html/storage | ||
STORAGE_BACKUP_PATH=/var/www/html/storage_ | ||
|
||
if [ ! -d "$STORAGE_PATH/app" ]; then | ||
echo "$STORAGE_PATH/app is not a directory, copying content from $STORAGE_BACKUP_PATH to $STORAGE_PATH" | ||
cp -r $STORAGE_BACKUP_PATH/. $STORAGE_PATH | ||
echo "Deleting $STORAGE_BACKUP_PATH..." | ||
rm -rf $STORAGE_BACKUP_PATH | ||
fi | ||
|
||
# Ensure the database folder and SQLite file exist | ||
DB_FOLDER=$STORAGE_PATH/database | ||
DB_FILE=$DB_FOLDER/database.sqlite | ||
|
||
if [ ! -d "$DB_FOLDER" ]; then | ||
echo "$DB_FOLDER does not exist, initializing database folder" | ||
mkdir -p $DB_FOLDER | ||
fi | ||
|
||
if [ ! -f "$DB_FILE" ]; then | ||
echo "$DB_FILE not found, creating SQLite database" | ||
touch $DB_FILE | ||
fi | ||
|
||
echo "Script execution completed." |
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,7 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # Exit immediately if a command exits with a non-zero status | ||
|
||
echo "Caching config..." | ||
/usr/bin/php /var/www/html/artisan config:cache --no-ansi -q | ||
|
||
echo "Caching routes..." | ||
/usr/bin/php /var/www/html/artisan route:cache --no-ansi -q | ||
|
||
echo "Caching views..." | ||
/usr/bin/php /var/www/html/artisan view:cache --no-ansi -q | ||
|
||
php artisan migrate --force | ||
echo "Running database migrations..." | ||
/usr/bin/php /var/www/html/artisan migrate --force --no-ansi -q | ||
|
||
echo "Deployment script completed successfully." |
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