Skip to content
Snippets Groups Projects
Unverified Commit 7f0a55bd authored by Janyk Steenbeek's avatar Janyk Steenbeek Committed by GitHub
Browse files

Update startup.sh

parent 397ea51a
No related branches found
No related tags found
No related merge requests found
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
ARTISAN_FILE="/app/artisan" ARTISAN_FILE="/app/artisan"
# Check if artisan exists and is executable # Check if PHP-CLI is installed and if artisan exists
if [[ -x "$(command -v php)" && -x "${ARTISAN_FILE}" ]]; then if [[ -x "$(command -v php)" && -f "${ARTISAN_FILE}" ]]; then
# Check if SKIP_OPTIMIZE_COMMANDS is NOT set # Check if SKIP_OPTIMIZE_COMMANDS is NOT set
if [[ -z "${SKIP_OPTIMIZE_COMMANDS}" ]]; then if [[ -z "${SKIP_OPTIMIZE_COMMANDS}" ]]; then
echo "Running artisan commands for production environment..." echo "Running artisan commands for production environment..."
...@@ -16,8 +16,16 @@ if [[ -x "$(command -v php)" && -x "${ARTISAN_FILE}" ]]; then ...@@ -16,8 +16,16 @@ if [[ -x "$(command -v php)" && -x "${ARTISAN_FILE}" ]]; then
else else
echo "Skipping optimization commands due to the SKIP_OPTIMIZE_COMMANDS environment variable." echo "Skipping optimization commands due to the SKIP_OPTIMIZE_COMMANDS environment variable."
fi fi
if [[ -z "${SKIP_STORAGE_LINK}" ]]; then
echo "Symlinking public storage..."
# Run recommended artisan commands for production
php ${ARTISAN_FILE} storage:link --force
else
echo "Skipping public storage linking due to the SKIP_STORAGE_LINK environment variable."
fi
else else
echo "Artisan or PHP not found. Skipping optimization commands." echo "Artisan or PHP not found. Skipping production initialization commands."
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment