@@ -13,7 +13,7 @@ chmod -R 755 /config
1313chown -R webuser:webgroup /config
1414chmod -R 755 $WEBUSER_HOME/storage
1515chown -R webuser:webgroup $WEBUSER_HOME/storage
16- echo "✅ Permissions fixed ."
16+ echo "✅ Done ."
1717echo ""
1818
1919if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
@@ -33,69 +33,31 @@ if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
3333 fi
3434 done
3535
36- echo "✅ Database symlink created ."
36+ echo "✅ Done ."
3737 echo ""
3838fi
3939
40- # Check for env file
41- if [ ! -f /config/.env ]; then
42- echo "🙄 Environment file not found, creating..."
43- s6-setuidgid webuser cp $WEBUSER_HOME/.env.production /config/.env
44- echo "✅ Environment file created."
45- else
46- echo "✅ Environment file exists."
47- fi
48-
49- echo ""
50-
51- # create symlinks
52- echo "🔗 Creating symlinks for config and log files..."
53- symlinks=( \
54- /var/www/html/.env \
55- )
56-
57- for i in "${symlinks[@]}"
58- do
59- if [[ -e "$i" && ! -L "$i" ]]; then
60- rm -rf "$i"
61- fi
62- if [[ ! -L "$i" ]]; then
63- ln -s /config/"$(basename "$i")" "$i"
64- fi
65- done
66-
67- echo "✅ Symlinks created."
68- echo ""
69-
7040# Check for app key
7141if [ ! ${APP_KEY} ]; then
72- if grep -E "APP_KEY=[0-9A-Za-z:+\/=]{1,}" $WEBUSER_HOME/.env > /dev/null; then
73- echo "✅ An application key exists."
74- else
75- echo "⏳ Generating an application key..."
76- export APP_KEY=$(s6-setuidgid webuser php $WEBUSER_HOME/artisan key:generate --show)
77- echo "⚠️ An application key was generated at start up, no environment variable was set."
78- echo "👀 To set an application key that persists, read the docs: https://docs.speedtest-tracker.dev/"
79- fi
80- else
81- echo "✅ An application key environment variable exists."
42+ echo "⚠️ An application key is missing!"
43+ echo "👀 To set an application key, read the docs: https://docs.speedtest-tracker.dev/"
8244fi
8345
8446echo ""
8547
8648# Refresh cache
87- echo "💰 Building the cache..."
88- s6-setuidgid webuser php $WEBUSER_HOME/artisan view:clear --no-ansi -q
49+ echo "💰 Refreshing the cache..."
50+ s6-setuidgid webuser php $WEBUSER_HOME/artisan filament:cache-components --no-ansi -q
8951s6-setuidgid webuser php $WEBUSER_HOME/artisan optimize --no-ansi -q
90- echo "✅ Cache set ."
52+ echo "✅ Done ."
9153echo ""
9254
9355# Migrate database
9456echo "🚛 Migrating the database..."
9557s6-setuidgid webuser php $WEBUSER_HOME/artisan migrate --force --no-ansi -q
96- echo "✅ Database migrated ."
58+ echo "✅ Done ."
9759echo ""
9860
9961# App install done, show a message
100- echo "✅ All set, Speedtest Tracker started. "
62+ echo "✅ All set, Speedtest Tracker has started! "
10163echo ""
0 commit comments