Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .env.production

This file was deleted.

1 change: 0 additions & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'force_https' => env('FORCE_HTTPS', false),

'aliases' => Facade::defaultAliases()->merge([
// 'ExampleClass' => App\Example\ExampleClass::class,
'TimeZoneHelper' => App\Helpers\TimeZoneHelper::class,
])->toArray(),

Expand Down
2 changes: 1 addition & 1 deletion config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [

'telegram-bot-api' => [
'token' => env('TELEGRAM_BOT_TOKEN', 'YOUR BOT TOKEN HERE'),
'token' => env('TELEGRAM_BOT_TOKEN'),
],

];
9 changes: 4 additions & 5 deletions config/speedtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@
use Carbon\Carbon;

return [
/**
* Build information
*/

'build_date' => Carbon::parse('2024-04-16'),

'build_version' => 'v0.19.0',

/**
* General
* General settings.
*/
'content_width' => env('CONTENT_WIDTH', '7xl'),

'public_dashboard' => env('PUBLIC_DASHBOARD', false),

/**
* Polling
* Polling settings.
*/
'dashboard_polling' => env('DASHBOARD_POLLING', '60s'),

'notification_polling' => env('NOTIFICATION_POLLING', '60s'),

'results_polling' => env('RESULTS_POLLING', null),

];
56 changes: 9 additions & 47 deletions docker/deploy/etc/s6-overlay/scripts/laravel-automations
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ chmod -R 755 /config
chown -R webuser:webgroup /config
chmod -R 755 $WEBUSER_HOME/storage
chown -R webuser:webgroup $WEBUSER_HOME/storage
echo "βœ… Permissions fixed."
echo "βœ… Done."
echo ""

if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
Expand All @@ -33,69 +33,31 @@ if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
fi
done

echo "βœ… Database symlink created."
echo "βœ… Done."
echo ""
fi

# Check for env file
if [ ! -f /config/.env ]; then
echo "πŸ™„ Environment file not found, creating..."
s6-setuidgid webuser cp $WEBUSER_HOME/.env.production /config/.env
echo "βœ… Environment file created."
else
echo "βœ… Environment file exists."
fi

echo ""

# create symlinks
echo "πŸ”— Creating symlinks for config and log files..."
symlinks=( \
/var/www/html/.env \
)

for i in "${symlinks[@]}"
do
if [[ -e "$i" && ! -L "$i" ]]; then
rm -rf "$i"
fi
if [[ ! -L "$i" ]]; then
ln -s /config/"$(basename "$i")" "$i"
fi
done

echo "βœ… Symlinks created."
echo ""

# Check for app key
if [ ! ${APP_KEY} ]; then
if grep -E "APP_KEY=[0-9A-Za-z:+\/=]{1,}" $WEBUSER_HOME/.env > /dev/null; then
echo "βœ… An application key exists."
else
echo "⏳ Generating an application key..."
export APP_KEY=$(s6-setuidgid webuser php $WEBUSER_HOME/artisan key:generate --show)
echo "⚠️ An application key was generated at start up, no environment variable was set."
echo "πŸ‘€ To set an application key that persists, read the docs: https://docs.speedtest-tracker.dev/"
fi
else
echo "βœ… An application key environment variable exists."
echo "⚠️ An application key is missing!"
echo "πŸ‘€ To set an application key, read the docs: https://docs.speedtest-tracker.dev/"
fi

echo ""

# Refresh cache
echo "πŸ’° Building the cache..."
s6-setuidgid webuser php $WEBUSER_HOME/artisan view:clear --no-ansi -q
echo "πŸ’° Refreshing the cache..."
s6-setuidgid webuser php $WEBUSER_HOME/artisan filament:cache-components --no-ansi -q
s6-setuidgid webuser php $WEBUSER_HOME/artisan optimize --no-ansi -q
echo "βœ… Cache set."
echo "βœ… Done."
echo ""

# Migrate database
echo "πŸš› Migrating the database..."
s6-setuidgid webuser php $WEBUSER_HOME/artisan migrate --force --no-ansi -q
echo "βœ… Database migrated."
echo "βœ… Done."
echo ""

# App install done, show a message
echo "βœ… All set, Speedtest Tracker started."
echo "βœ… All set, Speedtest Tracker has started!"
echo ""