Initial commit

This commit is contained in:
2024-02-06 00:20:42 +01:00
commit 7d760c25e3
11 changed files with 150 additions and 0 deletions

26
config/entrypoint.sh Executable file
View 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

View 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

View 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

View 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

View File

@ -0,0 +1,3 @@
#!/bin/sh
echo " ** Sorry, no framework detected."

View 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

View 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

View 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