Initial commit
This commit is contained in:
26
config/entrypoint.sh
Executable file
26
config/entrypoint.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
# run scripts in /entrypoint.d/
|
||||
if [ -d /entrypoint.d ]; then
|
||||
echo "[-] Calling entrypoint scripts..."
|
||||
for filename in /entrypoint.d/*.sh; do
|
||||
echo " -> $filename"
|
||||
if ! sh "$filename"; then exit 1; fi
|
||||
done
|
||||
else
|
||||
echo "[!] No scripts matching *.sh found in /entrypoint.d"
|
||||
fi
|
||||
|
||||
# run framework setups
|
||||
if [ -d /scripts/frameworks ]; then
|
||||
echo "[-] Calling framework setup scripts..."
|
||||
for filename in /scripts/frameworks/*.sh; do
|
||||
sh "$filename" && break
|
||||
done
|
||||
else
|
||||
echo "[!] No scripts matching *.sh found in /scripts/frameworks"
|
||||
fi
|
||||
|
||||
# pass off to supervisor
|
||||
echo "[-] Spawning supervisor"
|
||||
exec /usr/bin/supervisord -n -c /etc/supervisord.conf
|
9
config/frameworks/00-nginx-site.sh
Normal file
9
config/frameworks/00-nginx-site.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f /application/.nginx-site.conf ]; then
|
||||
echo " -- Installing nginx website config..."
|
||||
cp -F /application/.nginx-site.conf /etc/nginx/sites-enabled/default.conf
|
||||
fi
|
||||
|
||||
# scripts at level 00 should not end the framework setup
|
||||
exit 1
|
9
config/frameworks/10-symfony.sh
Normal file
9
config/frameworks/10-symfony.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -f /application/symfony.lock ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo " == Detected symfony project."
|
||||
cd /application
|
||||
/usr/bin/composer install --no-dev --no-cache --optimize-autoloader --no-progress
|
9
config/frameworks/90-composer.sh
Normal file
9
config/frameworks/90-composer.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -f /application/composer.json ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo " == Detected composer project."
|
||||
cd /application
|
||||
/usr/bin/composer install --no-dev --no-cache --optimize-autoloader --no-progress
|
3
config/frameworks/99-sorry.sh
Normal file
3
config/frameworks/99-sorry.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo " ** Sorry, no framework detected."
|
3
config/supervisor/exit-on-error.ini
Normal file
3
config/supervisor/exit-on-error.ini
Normal file
@ -0,0 +1,3 @@
|
||||
[eventlistener:process-trap]
|
||||
command=sh -c "echo READY && read line && kill -SIGQUIT $PPID"
|
||||
events=PROCESS_STATE_STOPPED,PROCESS_STATE_EXITED,PROCESS_STATE_FATAL
|
9
config/supervisor/nginx.ini
Normal file
9
config/supervisor/nginx.ini
Normal file
@ -0,0 +1,9 @@
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
|
||||
autostart=true
|
||||
autorestart=false
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
exitcodes=0
|
9
config/supervisor/php-fpm.ini
Normal file
9
config/supervisor/php-fpm.ini
Normal file
@ -0,0 +1,9 @@
|
||||
[program:php-fpm]
|
||||
command=/usr/sbin/php-fpm83 -F
|
||||
autostart=true
|
||||
autorestart=false
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
exitcodes=0
|
Reference in New Issue
Block a user