Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
Web Docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Research Support BSS
Web Docker
Commits
397ea51a
Unverified
Commit
397ea51a
authored
1 year ago
by
Janyk Steenbeek
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Update startup.sh
parent
6f0c3cf6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.deployment/startup.sh
+24
-1
24 additions, 1 deletion
.deployment/startup.sh
with
24 additions
and
1 deletion
.deployment/startup.sh
+
24
−
1
View file @
397ea51a
#!/bin/sh
#!/bin/sh
ARTISAN_FILE
=
"/app/artisan"
# Check if artisan exists and is executable
if
[[
-x
"
$(
command
-v
php
)
"
&&
-x
"
${
ARTISAN_FILE
}
"
]]
;
then
# Check if SKIP_OPTIMIZE_COMMANDS is NOT set
if
[[
-z
"
${
SKIP_OPTIMIZE_COMMANDS
}
"
]]
;
then
echo
"Running artisan commands for production environment..."
# Run recommended artisan commands for production
php
${
ARTISAN_FILE
}
config:cache
php
${
ARTISAN_FILE
}
route:cache
php
${
ARTISAN_FILE
}
view:cache
php
${
ARTISAN_FILE
}
optimize
else
echo
"Skipping optimization commands due to the SKIP_OPTIMIZE_COMMANDS environment variable."
fi
else
echo
"Artisan or PHP not found. Skipping optimization commands."
fi
echo
"Starting PHP FPM in daemon mode"
echo
"Starting PHP FPM in daemon mode"
php-fpm
-D
php-fpm
-D
# while ! nc -w 1 -z 127.0.0.1 9000; do sleep 0.1; done;
echo
"Testing NGINX"
echo
"Testing NGINX"
nginx
-t
nginx
-t
cat
/etc/nginx/nginx.conf
cat
/etc/nginx/nginx.conf
echo
"Starting NGINX"
echo
"Starting NGINX"
nginx
nginx
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment