diff --git a/.env.production b/.env.production deleted file mode 100644 index 646417915..000000000 --- a/.env.production +++ /dev/null @@ -1,23 +0,0 @@ -# A full list of options can be found in the '.env.example' file. - -# Application key -# Used for encryption where needed, if a key is not generated run: php artisan key:generate -APP_KEY= - -# Application URL -# Not used in the URL but effects links in emails and notifications: https://docs.speedtest-tracker.dev/faqs#links-in-emails-dont-point-to-the-correct-url -APP_URL=http://localhost - -# SMTP mail config -# Only SMTP protocol is supported at this time: https://docs.speedtest-tracker.dev/settings/notifications/mail -MAIL_MAILER=smtp -MAIL_HOST=mailhog -MAIL_PORT=1025 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS="hello@example.com" -MAIL_FROM_NAME="Speedtest Tracker" - -# Telegram bot config -TELEGRAM_BOT_TOKEN=null diff --git a/config/app.php b/config/app.php index 78e1e00d1..6c062b7f1 100644 --- a/config/app.php +++ b/config/app.php @@ -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(), diff --git a/config/services.php b/config/services.php index b25860f2c..cf7db308c 100644 --- a/config/services.php +++ b/config/services.php @@ -3,7 +3,7 @@ return [ 'telegram-bot-api' => [ - 'token' => env('TELEGRAM_BOT_TOKEN', 'YOUR BOT TOKEN HERE'), + 'token' => env('TELEGRAM_BOT_TOKEN'), ], ]; diff --git a/config/speedtest.php b/config/speedtest.php index 2057fe41d..33f12cdaa 100644 --- a/config/speedtest.php +++ b/config/speedtest.php @@ -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), + ]; diff --git a/docker/deploy/etc/s6-overlay/scripts/laravel-automations b/docker/deploy/etc/s6-overlay/scripts/laravel-automations index 884447c73..bae7bd85f 100644 --- a/docker/deploy/etc/s6-overlay/scripts/laravel-automations +++ b/docker/deploy/etc/s6-overlay/scripts/laravel-automations @@ -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 @@ -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 ""