Skip to content
Merged
Changes from 2 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
7 changes: 3 additions & 4 deletions root/etc/s6-overlay/s6-rc.d/init-speedtest-tracker-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,14 @@ done
# Check for app key
if [[ -z ${APP_KEY} ]]; then
if ! grep -E "APP_KEY=[0-9A-Za-z:+\/=]{1,}" /app/www/.env > /dev/null; then
export APP_KEY=$(s6-setuidgid abc php /app/www/artisan key:generate --show)
echo "An application key was generated at start up, as no environment variable was set."
echo "To set an application key that persists, read the docs: https://docs.speedtest-tracker.dev/"
echo "An application key is missing!"
echo "Go to https://speedtest-tracker.dev/ generate an application key."
fi
fi

# Build cache
s6-setuidgid abc php /app/www/artisan view:clear --no-ansi -q
s6-setuidgid abc php /app/www/artisan optimize --no-ansi -q
s6-setuidgid abc php /app/www/artisan filament:cache-components --no-ansi -q

# Migrate database
s6-setuidgid abc php /app/www/artisan migrate --force --no-ansi -q
Expand Down